According to LINFO, PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files in response to commands issued by a user.
For example, when you want to use sed command, you can type sed instead of /bin/sed.
The PATH value is composed of several absolute paths that are separated by colons. When the user issues a command that is not built in the shell or that is not an executable file’s absolute path, the shell searches through the absolute paths in PATH until it finds the corresponding executable file.
To view PATH:
# echo $PATH
You can add a directory to PATH for the current session using:
To make the change permanent, edit .bash_profile file in the user’s home directory.
Find the line that starts with “PATH=” and add the directory:
# . $HOME/.bash_profile