美文网首页
/etc/profile VS ~/.profile /e

/etc/profile VS ~/.profile /e

作者: Ten_Minutes | 来源:发表于2018-05-07 11:08 被阅读13次

/etc/profile 文件中设定的环境变量,运行的命令或脚本,针对所有用户有效

/etc/bashrc 文件中设定的本地变量,定义的别名,针对所有启动的shell程序的用户有效

这两个配置文件是全局的。

~/.bash_profile 作用跟/etc/profile是一样的,只不过针对的是某一个用户

~/.bashrc的作用跟/etc/bashrc也是一样的,只不过针对的也是某一个用户

相关文章

网友评论

      本文标题:/etc/profile VS ~/.profile /e

      本文链接:https://www.haomeiwen.com/subject/teemrftx.html