我想在Linux Mint 14 Cinnamon中修改我的用户路径,在我的用户的$ PATH中包含$ HOME / bin。
警告:简单地添加.profile似乎不起作用,即使.profile中的其他命令被正确调用,即使它在显式调用源.profile时也能正常工作。
我的替代方案是什么?
答案 0 :(得分:2)
事实证明,编辑的正确文件是.bashrc,而不是.profile。 .profile会在开头调用.bashrc。
添加到.bashrc:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
export PATH="$HOME/bin:$PATH"
fi
答案 1 :(得分:0)
将文字放在~/.bashrc
为我工作。当文档对我来说就像在.profile
文件中那样令人愉快。