finding environmental variables
Operating system: Linux: Environment: Variable: Path: Set: How to set the PATH variable in Linux?
The PATH environment variable contains a list of directories used by
the shell to locate
executable files typed on the command line.
If you then type a command on the command line, each of this
directories is searched,
from left to right, until the executable with the same name is found.
---
---
The format of the path in general is:
PATH=
so a list of directories separated by colons
---
---
To set the PATH environment variable:
---
Steps: Overview:
1. -Open a console
2. -If necessary login with the wanted userid:
1. type
su
and supply a password
2. To check the current value of the PATH
environment variable, type:
echo $PATH
that will show the current path
e.g.
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/roo
t/bin
3. -To set the new path
1. to APPEND your new directory at the END of the current path
type the command:
PATH=$PATH:
e.g.
PATH=$PATH:/mydirectory
will add '/mydirectory' at the end of the existing
path
2. to APPEND your new directory at the BEGINNING of the current
path
type the command:
PATH=
e.g.
PATH=/mydirectory:$PATH
will add '/mydirectory' at the beginning of the existing
path
3. to OVERWRITE the current path
(so use with caution, possibly write down the old path first),
type the command:
PATH=
e.g.
PATH=$HOME/bin:/bin/:/usr/bin
---
PS do not use spaces
---
$HOME/bin
and
/bin
and
/usr/bin
---
---
Successfully tested in Linux Red Hat v9
---
---
Internet: see also:
---
Operating system: Linux: Command: Environment: Set: How to set an
environment variable in Linux?
http://www.faqts.com/knowledge_base/view.phtml/aid/29077/fid/457
------------------------------------------------------------
trying to install GTK+ 2.4 on mandrake 9.2, having quitte a few problems...it asks me to modify my LD_LIBRARY_PATH environment variable.....where can i find this, and what am i supposed to modify it to?
It probably isn't set at all ...
As for the value: if it wants you to set it, it
is likely to say what to set it to as well...
export LD_LIBRARY_PATH=
To see whether it actually is set try
echo $LD_LIBRARY_PATH
or
env | grep LIBRARY
------------------------------------------------------------