Linux上的shell相关⽂件
站在⽤户登录的⾓度来说,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如何读取配置⽂件?
/
linux执行shell命令etc/profile --> /etc/profile.d/*.sh --> ~/.bash_profile --> ~/.bashrc --> /etc/bashrc
⾮登录式shell如何配置⽂件?
~/.bashrc --> /etc/basrc --> /etc/profile.d/*.sh
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论