PWD —Provides the full path to your current working directory, used by the pwd command
USER —Declares the user’s name, such as matthew
LANG —Sets the default language, such as English
SHELL —Declares the name and location of the current shell, such as /bin/bash
PATH —Sets the default locations of executable files, such as /bin , /usr/bin , and so on
TERM —Sets the type of terminal in use, such as vt100 , which can be important when using screen-orientedprograms, such as text editors
# 打印某个环境变量echo $USER# 打印所有环境变量env
/etc/profile
/etc/profile.d/
/etc/bash.bashrc
~/.bash_profile
~/.profile
~/.bashrc
…
$PATH
echo $PATHwhereis cmd# .bash_profile# PATH=$PATH:$HOME/binsource .bash_profile# exportexport PS1='$OSTYPE r001z ->'
