PATH is a list of directories where commands are looked for.

The syntax for setting your path is slightly dependent on the shell you are using. You can type the below command on terminal of you can add the same in your .bashrc (Bash shell) or in .cshrc (csh tcsh shell)

For bash shell:

export PATH=$PATH:/usr/sbin/:/usr/local/bin

For tcsh or csh:

set PATH = ($PATH /usr/sbin /usr/local/bin)

If you want to see the existing PATH then run,

echo $PATH
Setting PATH in Linux
Tagged on:                                                             

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recommend on Google