bash Ubuntu系统路径设置在哪个文件中?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10996996/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
In which file is the Ubuntu system path set?
提问by Vihaan Verma
I have system path
我有系统路径
vickey@tb:~/work/sayonara$ echo $PATH
/usr/local/Trolltech/Qt-4.8.0/bin:/home/vickey/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/vickey/bin:/home/vickey/tunebasket/p2p/
vickey@tb:~/work/sayonara$ cd /usr/local/
I want to get rid of the first entry PERMANENTLY . Where is the system path being set ?
我想永久删除第一个条目。系统路径在哪里设置?
回答by Sebi
You should first start looking at:
您应该首先开始查看:
/etc/environment
If it is not included there, take a look at:
如果它没有包含在那里,请查看:
/etc/profile
The next possible location depends on the shell you are using. All shells also have a default config file located in /etc like /etc/bash.bashrc.
下一个可能的位置取决于您使用的外壳。所有 shell 也有一个位于 /etc 中的默认配置文件,如 /etc/bash.bashrc。

