E-learning module "Linux Basics"
Environment Variables
The following environment variables are often used:
$HOME
→ User directory ~
→ User directory$PWD
→ current directory$OLDPWD
→ the former directory$PATH
→ a list of directories the system searches for programs in the given sequence.
Examples:
$ echo $HOME
/home/user1
→ User directory.$ echo ~
/home/user1
→ User directory.
$ env
→ environment. Displays a list of environment variables. Can be used to change the environment (and provides the possibility to run programs with different environment).
![]() | The content of this e-learning module is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany license (CC BY-NC-SA 3.0 DE). |