How to Install Ns2 in Ubuntu 16.04

If you are in search of the best article to know about the installation of network simulator 2 in Ubuntu 16.04, then you can to checkout this article.

Step: 1 Ns2 Download in Ubuntu 16.04

Firstly, we have to implement the below mentioned commands to download the Ns2.35 packages in Ubuntu 16.04 terminal window.

git clone

Link to Download Ns2

Then, we have to copy and paste the downloaded package into the Ubuntu 16.04 home location and extract the zip file.

Make Changes in Package File

After completing the downloading process, we have to make some changes in the package file.

Open the file: ~ns-2.35/linkstate/ls.h

In that above file Change at the Line no 137

void eraseAll() { erase(baseMap::begin(), baseMap::end()); }

To This,

void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }

Alterations in Package File

While completing the alterations in the package file, then it is ready for the installation process.

Install Ns2 in Ubuntu 16.04

Most significantly, we have to change the location of the package through the execution of below mentioned commands in terminal.

cd ns-allinone-2.35

Changing Location

Then, we have to execute the below mentioned commands to install the Ns2.35 in Ubuntu 16.04.

Installation of Ns2

The research scholars can reach us at any time to acquire a lot of the significance of installing the network simulator 2.


Opening Time


Lunch Time


Break Time


Closing Time


  • award1
  • award2