Debian $PATH 变量更改 [英] Debian $PATH variable change

查看:31
本文介绍了Debian $PATH 变量更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Debian 中更改 $PATH 变量?我试图更改 /etc/profile 但这仅影响普通用户(是的,我添加了用户和 root 路径的路径).

How can I change the $PATH variable in Debian? I tried to change /etc/profile but this affected only normal users (and yes, I added path to BOTH user's and root's paths).

之后我尝试编辑 /root/.profile 然后 /root/.bashrc 也...

After that I tried to edit /root/.profile and then /root/.bashrc also ...

都没有奏效.你知道哪里有问题吗?

Neither worked. Do you know where could be problem?

推荐答案

这在 debian 6.0 上的/etc/login.defs 中设置.

This is set in the /etc/login.defs on debian 6.0 .

这些是您必须编辑的行:

These are the lines you have to edit:

# *REQUIRED*  The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the rest in the shell startup files)
ENV_SUPATH      PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH        PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

我忘了把我找到解决方案的地方放在哪里:https://serverfault.com/questions/166383/how-set-path-for-all-users-in-debian

I forgot to put where I found the solution: https://serverfault.com/questions/166383/how-set-path-for-all-users-in-debian

这篇关于Debian $PATH 变量更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆