Adding a path to the .bashrc file?

前端 未结 2 1948
一个人的身影
一个人的身影 2020-12-28 08:22

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 entere

相关标签:
2条回答
  • 2020-12-28 08:56

    The PATH should contain the directory for the binaries, not the binaries themselves.

    For example, in the above:

    export PATH=/home/michael/ns-allinone-2.34/bin/ns:..
    

    should actually be:

    export PATH=/home/michael/ns-allinone-2.34/bin:...
    
    0 讨论(0)
  • 2020-12-28 09:10

    Also if you export path like this, you want to keep old PATH as well, therefore include it as well.

    export PATH=$PATH:/home/michael/ns-allinone-2.34/bin/
    
    0 讨论(0)
提交回复
热议问题