In order to install ns2 on ubuntu it is just like writing three commands
Open the terminal
Now type the commnad
"sudo apt-get install ns2"
"sudo apt-get install nam"
and its done
now execute the command sudo apt-get update
and then "ns "in the terminal the % should appear
Open the terminal
Now type the commnad
"sudo apt-get install ns2"
"sudo apt-get install nam"
and last command is
sudo apt-get install xgraph
now execute the command sudo apt-get update
and then "ns "in the terminal the % should appear