相关疑难解决方法(0)

为什么不为非登录 shell 调用 /etc/profile?

登录和非登录 shell 定义为:

su - $USER # will give you a login shell
bash # will give you a non-login shell
Run Code Online (Sandbox Code Playgroud)

/etc/profile 不会为非登录 shell 调用,例如当您启动 konsole (kde) 时。/etc/profile 仅为登录 shell 调用。

这是为什么?请解释一下,因为我喜欢了解其原理。

command-line login bashrc

62
推荐指数
1
解决办法
9万
查看次数

标签 统计

bashrc ×1

command-line ×1

login ×1