How-To Add a Path to an Environment Variable
Paths:
-
PATH or path - list of locations of executable programs.
-
MANPATH - list of locations of man pages (to be read with the man command).
-
LD_LIBRARY_PATH - list of locations of shared libraries needed to compile a program.
-
INFOPATH - list of locations of gnu info pages (to be read with the info command or emacs).
How to Determine the Value of the Environment Variable:
-
echo $path
-
echo $MANPATH
-
echo $LD_LIBRARY_PATH
Where to Add the Path:
-
The "path" variable can be added to your .cshrc file which is found
in your home directory
(or to .cshrc.IRIX or .cshrc.SunOS - if your setup uses these files).
If you just added any of the following lines to your .cshrc,
you must run: source ~/.cshrc
in each open terminal in order that it takes effect there.
On any subsequent logins, this file will automatically be sourced.
-
You can also type any of the lines below on an open terminal.
This will cause the path to be accessible for the life of that terminal.
The /usr/local/lib/.system.cshrc File:
-
The CIMS systems people have created a file called
/usr/local/lib/.system.cshrc
on both the Suns & the SGIs
Many of the paths needed to run the AML software are found
in this file.
This file is constantly updated when new software is installed
or locations are changed.
If you do not have the following line in your ~/.cshrc file
source /usr/local/lib/.system.cshrc
you might want to integrate it into your ~/.cshrc.
Put this line at the beginning of your .cshrc file.
Then care must be taken to add paths not noted in this file
in the manner described below.
How to Add the Path:
-
Adding a path to your PATH environment variable
can be done in either of the following ways:
-
set path = ($path /PathtoBeAdded)
-
setenv PATH {$PATH}:/PathtoBeAdded
type: rehash
in your terminal the first time you reset the PATH variable.
This will add all the programs in the new directory to
the list of executables.
-
To add a path to your MANPATH environment variable
- setenv MANPATH {$MANPATH}:/PathtoBeAdded
-
To add a path to your LD_LIBRARY_PATH environment variable
- setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:/PathtoBeAdded
Locations that should to be added to paths ( in order listed)
-
Executables Paths
Paths to be added to the
PATH variable.
- On the Suns:
- /opt/SUNWspro/bin - for Sun Workshop compilers
- /usr/local/bin
- /opt/bin
- /tools/aml-estarose/local/sun_bin
- On the SGIs:
- /usr/freeware/bin
- /usr/local/bin
- /opt/bin
- /tools/aml-estarose/local/bin
-
Man Page Paths
Paths to be added to the
MANPATH variable.
- On the Suns:
- /opt/SUNWspro/man - for Sun Workshop man pages
- /usr/local/man
- /opt/man
- /tools/aml-estarose/local/man
- On the SGIs:
- /usr/freeware/catman
- /usr/local/catman
- /opt/catman
- /tools/aml-estarose/local/man
-
Library Paths
Paths to be added to the
LD_LIBRARY_PATH variable.
- On the Suns:
- /opt/SUNWspro/lib - for Sun Workshop libraries
- /usr/local/man
- /opt/man
- /tools/aml-estarose/local/man
- On the SGIs:
- /usr/freeware/catman
- /usr/local/catman
- /opt/catman
- /tools/aml-estarose/local/man
- Info Paths
Paths to be set in the INFOPATH variable.
- On the Suns:
- /usr/local/info
- /opt/info
- /tools/aml-estarose/local/info
- On the SGIs:
- /usr/freeware/info
- /usr/local/info
- /opt/info
- /tools/aml-estarose/local/info