Ns 2 Easy installation step by step guide

First of all open the terminal in your Ubuntu/debain/linux mint. And then type following code in terminal and then click enter.

sudo apt-get install ns2

After Completing the installation, then type the following code to begin installation of NAM

sudo apt-get purge nam

After Completing the previous step and then download the Deb file. And copy/cut the downloaded Deb file into home folder. And then type the following codes.

sudo dpkg -i nam_1.15-10-ubuntu14_amd64.deb
sudo apt-mark hold nam

Yes you are successfully installed ns2 into your Ubuntu.

How to run NS 2 in terminal and open the nam in gui

Open any text editor and write your program and then save it in home folder.

Note : (Filename).tcl (sample.tcl)

Open the terminal and type

ns sample.tcl

It will show the output in terminal

And also It will create the output file like out.nam

And then type

nam out.nam

It will show graphical user interface(GUI) of NAM.

If you have any doubt. Don’t hesitate please ask me in comment section.

Thank you for reading my blog.

Leave a comment