Ubuntu – What does $PATH mean

command line

I am trying to install something and among the steps there was this one:

"Place it on your $PATH"

What does this mean? What is that?

I have searched both this site and on Google but everyone just takes it for granted!

Best Answer

Run in a terminal:

echo $PATH


printf "%s\n" "$PATH"

what you see is a list of directories, looking like:


If you put an executable in either one of these directories, you do not need to set the path to the executable / script, but you can run it by its name as a command.

Executables in $PATH should not have a language extension by convention (although they would work)

Editing your $PATH variable

You can (permanently) add a directory to $PATH by adding the following line to your ~/.profile file (invisible by default, press Ctrl+H in the file manager to make it visible):

export PATH=$PATH:/path/to/dir

More usefull information on environment variables

(such as $PATH) can be found here (thanks for the suggestions @Letizia)