Adding a path to your PATH
February 2nd, 2005
To add a path to your PATH variable edit your shell initialization file(s) as follows.
C shell (csh)
To add your home directory (~) to your PATH, add the following to the .cshrc file in your home directory:
set path = ($path ~)
Bourne shell (bash)
To add your home directory (~) to your PATH, add the following to the .bashrc file in your home directory:
PATH="$PATH:~"; export PATH
Your changes take affect the next time you log in. To apply your changes now, run the following commands.
C shell (csh)
source .cshrc
Bourne shell (bash)
. .profile
Potentially similar posts
- Scan for available IP addresses – August 2011
- My first (useful) Ruby program – June 2011
- Adding your choice of text editor to Flare’s Open With menu – December 2010
- Gotchas with running a Perl script as a cron job – August 2010
- UNIX on Windows (Microsoft’s little secret) – March 2010