/etc/profile 与 /etc/environment

/etc/profile 是一个脚本文件,作用于所有用户。当在图形界面启动shell或者切换到文本模式登录时将执行该脚本,但使用命令su 切换用户时并不会执行该脚本(需要使用source重新载入)。

/etc/environment 是一个系统配置文件,也是对所有用户起作用。

猜你喜欢

转载自blog.csdn.net/nice_wen/article/details/78208824