在 .bashrc 文件的末尾,我添加了以下行来设置路径到我家目录中的
如何将文件夹
foo
文件夹:PATH = $PATH:/home/username/foo
export PATH;
然后我在bash中输入:
source .bashrc
以下内容产生了错误:
bash: PATH: command not found
我正在使用Debian Squeeze。在一个类似的问题这里建议修改/etc/login.defs。我不想这样做,因为在login.defs中已经写明:
add the rest [of your paths] in the shell startup files
如何将文件夹
foo
添加到.bashrc的PATH中?
export PATH=$PATH:/home/username/foo
更好地防止任何意外覆盖。 - mehtabsinghmann