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

linux基础 --- shell

2015-11-02 15:44 357 查看
站在用户登录的角度来说,SHELL的类型:

登录式shell

正常通常某终端登录

su - USERNAME

su -l USERNAME

非登录式shell

su USERNAME

图形终端下打开命令窗口

自动执行的shell脚本

bash的配置文件:
全局配置:   /etc/profile,/etc/profile.d/*.sh ,/etc/bashrc
个人配置:~/.bash_profile,~/.bashrc

profile类的文件作用:  设定环境变量    运行命令或脚本

bashrc类的文件的作用:  设定本地变量   定义别名

登录式shell读取配置文件顺序:
/etc/profile --> /etc/profile.d/*.sh -->~/.bash_profile --> ~/.bashrc --> /etc/bashrc
非登录式shell读取配置文件顺序:
~/.bashrc --> /etc/basrc --> /etc/profile.d/*.sh
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  shell 脚本