添加到.bashrc文件的路径? [英] Adding a path to the .bashrc file?
问题描述
目前,我尝试添加路径NS-2到我的.bashrc文件,我已经安装了NS-ALLINONE 2.34,但该命令NS给出结果:当进入外壳没有找到命令<。 / p>
下面是我的.bashrc文件目前的样子,我是编辑用的gedit:
#的.bashrc#源的全局定义
如果[-f的/ etc / bashrc中];然后
。在/ etc / bashrc中
科幻
#用户特定的别名和函数
出口PATH = /家庭/迈克尔/ NS-ALLINONE 2.34 /斌/ NS:/home/michael/ns-allinone-2.34/bin/nam:$ PATH
有人可以解释为什么这不工作或一个可能的解决方案是什么?我使用的Fedora 17。
的 PATH
应包含的目录的为二进制文件,而不是二进制文件他们自己。
即。在上述
出口PATH = /家庭/迈克尔/ NS-ALLINONE 2.34 /斌/ NS:..
应
出口PATH = /家庭/迈克尔/ NS-ALLINONE 2.34 /斌:...
At the moment I am trying to add a path for ns-2 to my .bashrc file, I have installed the ns-allinone-2.34 but the command ns gives the result: command not found when entered into the shell.
Here is what my .bashrc file currently looks like, I edited it using gedit:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
export PATH=/home/michael/ns-allinone-2.34/bin/ns:/home/michael/ns-allinone-2.34/bin/nam:$PATH
Can someone please explain why this isn't working or what a possible solution may be? I am using fedora 17.
The PATH
should contain the directory for the binaries, not the binaries themselves.
i.e. in the above
export PATH=/home/michael/ns-allinone-2.34/bin/ns:..
should be
export PATH=/home/michael/ns-allinone-2.34/bin:...
这篇关于添加到.bashrc文件的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!