Changing the execution path permanently

To change the execution path to be the same for each shell session you have to add a line in the run command file (rc-file) for your shell. The rc-file is executed each time you log in to your account.

The rc-file is located in you home directory and but the name varies between shells. Here are the names for some of the more common shells.

ShellName
SH .profile
KSH.kshrc
BASH.bashrc
CSH.cshrc
TCSH.tcshrc
Once you have located your rc-file you add one line to change the path each time you log in. The line to add is different if you are using a C Shell based or a Bourne shell based shell.

Assume that we wish to add the path /home/matkin/bin to the path. For Bourne shell based shells (SH,KSH,BASH) you add the line:

export PATH
PATH="/home/matkin/bin:$PATH"
and for C Shell based shells you add the line: `
set path (/home/matkin/bin $path)

© 1996 Matz Kindahl <matkin@docs.uu.se>
Last modified: Tue Jun 25 12:40:03 2002