Ns2 Installation on windows using wsl

Heyyy all, here is the full explanation about how to install NS2 using WSL(included all the errors and how to handle those errors as well), I have written the steps one by one and you also do it in the same way. Without using any virtual machine platforms we can able to use Ubuntu on windows with the help pf windows subsystem on linux…..:)

lets begin yayyy!!

  1. Open your windows settings and turn on the developer mode
  2. Press windows button and type — “turn windows features on or off”, open it and turn on I. Virtual Machine Platform & II. Windows subsystem for Linux (Restart your computer if required).
  3. Go to microsoft store and search for ubuntu — download the latest version of ubuntu (ubuntu — 24.04).
  4. After downloading it, open it with terminal (To open terminal — press windows button and type — terminal)
  5. After opening it, if it asks for a user name then give username as per your wish & create a password as well (Give password in a simple format — ex -1234)
  6. If the ubuntu is throwing a wsl error, Don’t worry do the following hehe :)
  7. Open command prompt as an administrator.
  8. Type the following commands one by one I . wsl II. wsl — update III. wsl — list — online IV. wsl — install -d Ubuntu-24.04
  9. After these commands the ubuntu latest version will be opened and it will ask for the username and password.
  10. After giving those credentials type these Linux commands one by one I. sudo apt update II. sudo apt-get install ns2 III. sudo apt-get install gedit IV. sudo apt -install tcl (whenever it asks for Y/N just click y and press enter)
  11. Here it comes the important part — NAM (Network Animator) To install nam just download the nam file through this link (https://drive.google.com/file/d/1dkNPNN23Vy6o_zT0uIRBgUAo1VCXcVOY/view?usp=drive_link)
  12. Create a new folder in the desktop folder and name it as ns2, Save the nam file in the ns2 folder.
  13. Now we are going to locate the nam file through ubuntu, just open the ubuntu through terminal and type the following commands one by one I . cd /mnt/c/Users
  14. After this the commands will vary for every laptop to figure out the commands just head to the ns2 folder and see it’s location. I. The final command will look like this…( username/Desktop/ns2)
  15. Now to install the nam file just type this command I. sudo dpkg -i nam_1.14_amd_64.deb
  16. Now we are going to download the Xming server I. open any browser type “Xming download” II. click the first link and download III. complete the installation, Don’t forget to add it on desktop while installation
  17. Now it’s time to check whether everything is working correctly or not. open the ubuntu through terminal type the following commands one by one I. Type “ns” press enter II. Type “nam” press enter
  18. Now lets create a tcl file and save it like this — ex.tcl, file.tcl.
  19. lets run those files using commands on ubuntu I. gedit ex.tcl(filename) II. ns ex.tcl
  20. Thats all about installing Ns2 in the windows without using virtual machine and those old methods let’s try these steps and let me know if you got any errors while installing ns2 throgh this process….:)

Happy Coding…..:)!!! let’s connect on linkedin and if you have any doubts regarding ns2 feel free to ask !!

要查看或添加评论,请登录

社区洞察

其他会员也浏览了