There are two ways of using NS2:
On Linux Operating System or on Windows Operating System.
On Linux, after downloading NS2 follow these steps:
Copy ns-allinone-2.35.tar.gz file to your home directory.
Run terminal by pressing Ctrl+Alt+T .
Execute “tar -xzvf ns-allinone-2.35.tar.gz” command.
Execute “cd ns-allinone-2.35” command. Execute “./install” command. Execute “cd ns2.35” command.