Home   Profile   Fun
#27 Linux  03.04.2007

Environment variables


Print all environment variables
printenv

Print an environment variable
echo $VAR

Create or set an environment variable (only for the current session)
VAR="value"
export VAR

Remove an environment variable (only for the current session)
unset VAR

To expand the $PATH environment variable permanently you can put the following line into $HOME/.profile
export PATH=$PATH:/new/path

To activate this setting run
. $HOME/.profile