The PATH variable contains a list of the default directories that are searched for any command you type in that is without a path. To change it in tcsh or any csh based shell edit your .cshrc file in your home directory and add the directory where you see set path

# ee ~/.cshrc

Your default path will look something like this

set path = (/sbin /bin /usr/sbin /usr/bin)

Add in the new directory seperating it by a space

set path = (/sbin /bin /usr/sbin /usr/home/plato/mybin)

Once you are finished editting the file log out and log back in for the changes to take effect. If you are adding a new file to a directory in your path use rehash to update the shell.

For other shells try the .profile or .bashrc file to update your PATH.

Post By Editor (2,827 Posts)

Website: →