033-Unit 9 Configuring the bash Shell
Local variables , Aliases and functions , the set command
Variables : local and environment
set command display all variables
env command display all environment variables
echo $xxx
Common Local Variables : HISTFILESIZE , COLUMNS , LINES , PS1
Aliases : alias lf='ls -laF' ; alias see all set aliases
set command : set -o vi/noclobber
Environment Variables : export variable name ; export xx=1
unset variable name 删除变量
Common Environment Variables : HOME , LANG 语言 , PWD 当前工作路径
TERM 终端类型(terminal type)
reset command
PATH 系统预设路径,用":"分隔
which command
shell startup scripts
login/non-login shell
Start Script Order of Execution : login shell : /etc/profile -> /etc/profile.d/*.sh -> ~/.bash_profile -> ~/.bashrc ->/etc/bashrc ;
non-login shell : ~/.bashrc ->/etc/bashrc -> /etc/profile.d/*.sh ;
/etc/profile : PATH , USER , LOGNAME , MAIL , HOSTNAME , HISTSIZE , INPUTRC
/etc/profile.d/ : set up variables and run initialization procedures
~/.bash_profile and ~/.bashrc :
~/.bash_logout : execute when exiting a login shell