Wednesday, November 18, 2009

Set path in Unix C shell

In Linux, the default shell is BASH. The C shell is one of the alternatives available and is the default shell in FreeBSD. If you need to manipulate directories in the path environment variable using the C shell, this is how you make changes:
set path = ( $path /location/to/add )
If you want to add more locations you can. If you want to completely override the default path with something completely new then leave off the $path part. Running this command on its own will set the path until you log out. To set it permanently for a given user add that line to that user's ~/.cshrc file.

No comments:

Post a Comment