加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

是否有系统上所有用户的全局.bash_profile?

发布时间:2020-12-15 18:40:21 所属栏目:安全 来源:网络整理
导读:所以我偶然发现 svn color,并认为这是我们所有开发人员都会欣赏的有用的东西.为此我读了一下说在?/ .bash_profile中放了一些代码,但是我想知道如何在服务器上全局包含它,所以这是每个人的默认值.是否有一些全局.bash_profile我可以添加这个?也许另一种方式
所以我偶然发现 svn color,并认为这是我们所有开发人员都会欣赏的有用的东西.为此我读了一下说在?/ .bash_profile中放了一些代码,但是我想知道如何在服务器上全局包含它,所以这是每个人的默认值.是否有一些全局.bash_profile我可以添加这个?也许另一种方式?
要为系统上的所有用户包含命令,请使用/ etc / profile.

从http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files起

When Bash is invoked as an interactive login shell,or as a
non-interactive shell with the –login option,it first reads and
executes commands from the file /etc/profile,if that file exists.
After reading that file,it looks for ~/.bash_profile,~/.bash_login,
and ~/.profile,in that order,and reads and executes commands from
the first one that exists and is readable.

默认情况下,某些发行版也会读取/etc/profile.d/*,您可以将自定义设置放在那里.见http://bash.cyberciti.biz/guide//etc/profile.d

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读