The Error Message
After the installation some one type "ns" and get the following error
>>nsbash: ns: command not found
This could be because you have not set the $PATH variable. Therefore, the OS does not know where to look for the command "ns".
Has NS2 Been Installed Correctly?
Here is what you have to do
- Go to your directory ns2
- If you type "ls", you should see the file "ns.exe"
- Type "./ns".
- NS2 should run correctly.
Well, you will have to make the command "ns" globally available. There are two way to achieve this
- Set the $PATH variable in the file .bashrc located in your home directory (See the slide and the previous post)
- Create a symbolic link to the OS search path such as "/usr/local/bin". To do this, type the followings:
>>ln –s /home/T_Bear/ns-allinone-2.35-RC3/ns-2.35/ns.exe
This statement works for my system. You might have to adjust the directory accordingly.
Note: "ln -s" is a command which creates a symbolic link to the following input argument to the current directory [see here for more detail]
NS2 should run now correctly.
NS 2.35 Installation Slides
I updated the slide accordingly. Please have a look below:
View more presentations from Teerawat Issariyakul.