正文
linux关于profile 、bashrc 、.bash_profile、.bashrc的区别
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
linux关于profile 、bashrc 、.bash_profile、.bashrc的区别
- /etc/profile /etc/bashrc ~/.bash_profile ~/.bashrc
作用范围系统全局所有用户系统全局所有用户针对单个用户有效,如/home/user1/.bash_profile 中设定了环境变量,只针对 user1 这个用户生效.针对单个用户有效
作用内容设置全局系统环境参数设置全局系统bash shell相关的配置功能和/etc/profile类似类似于/etc/bashrc
是否loginshelllogin shellnon-loginshell交互式 login shellnon-loginshell
生效时间所有用户登入时所有用户登入时针对的用户,在登入的时候加载一次针对的用户,每次执行shell脚本时都会使用它一次
即时生效命令:
source 文件名称
1
例如:
source /etc/profile
1
————————————————
版权声明:本文为CSDN博主「xiaojin21cen」的原创文章,遵循 CC 4.0 BY 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xiaojin21cen/article/details/79092206