To view the current path, either of the following commands work:
1.
$ echo $PATH
or
2.
$ set | grep PATH
To set the $PATH environment variable in Linux (add a new directory to the current path while retaining the other directories):
$ export PATH=$PATH:<new_directory>
Below is a sample screen display:
$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/user/bin
$ export PATH=$PATH:/home/user/temp
$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/user/bin:/home/user/temp