您的位置:首页 > 运维架构 > Shell

033-Unit 9 Configuring the bash Shell

2009-08-10 22:09 344 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: