在 中安装了一些程序后/opt/xxx/bin
,我想为所有用户的非登录 shell添加/opt/xxx/bin
到系统$PATH
中。我该怎么办?
我在/opt/my-program/bin 中安装了一些程序,我想为所有用户的非登录shell 和登录shell 添加/opt/my-program/bin 到系统$PATH。我该怎么办?
更改 /etc/environment 对于非登录 shell 是可以的,但它不适用于登录 shell,因为 Debian 的 /etc/profile(将由登录 shell 提供)将覆盖 /etc/environment 中指定的 $PATH。