...

/

Info System and Brief Help

Info System and Brief Help

Learn how to find out more detailed information regarding commands and utility functions.

We'll cover the following...

PATH

We can print the PATH variable using echo. The following shows its output.

What does this line mean? It’s a list of paths separated by colons. If we write each path on a new line, we get the following list:

/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin

The format of the PATH variable raises questions. Why does Bash use colons as delimiters instead of line breaks? Line breaks make it easy to read the list. The reason is the specific behavior of Bash and some utilities when handling line breaks. Colons allow developers to avoid potential problems.

Let’s suppose that we want to locate an executable file of some program on the disk. The PATH variable gives us a hint of where to look. Then, we can apply the ...