PATH

When a user invokes a command in the terminal, the system executes a program. Therefore, Linux has to be able to locate the correct executable. PATH specifies program directories and instructs the system where to search for a program to run.

echo $PATH

or

printenv PATH

will display the content of PATH given in a successions of directories separated by a ':' (column)

To add a directory to PATH permanently, open the file ~/.bashrc and go to the end of the file. Then add the following:

export PATH="/new_directory_path:$PATH"

Close the file and save. Reboot the system and the changes will be live. Check that everything is as expected by running the ‘echo’ command as mentioned earlier.