Hey All, this post explains how to install NS2 easily using Windows OS using Windows Subsystem for Linux. Before starting the topic, lets talk a little about WSL oe Windows Subsystem for Linux.
Windows Subsystem for Linux
The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup.
Step 1: Turn on developer mode
Search > Developer Settings > Turn on Developer mode
Step 2: Download Ubuntu from Store
Go to Microsoft Store and Download Ubuntu.
It may take few minutes and reboot the system once installation completed.
Step 5: Updating Ubuntu OS and NS2 Installation
- sudo apt update
- sudo apt-get install ns2
- sudo apt-get install nam
- sudo apt-get install gedit
- sudo apt install tcl
- cd/mnt/OS Drive Name/Users/UserProfile/Desktop
- cd folder_name_in_Desktop
Example: cd/mnt/C/Users/ns2bloggers/Desktop & cd NS2
Step 7: XLaunch Configuration
Open XLaunch application, for server configuration-
- In the first screen, select → Full Screen
- In the second screen, select → Start no client
- Rest of the screens just click on next and finish the config setup
- The window closes and it's done
Step 8 : Final Settings
- Type export DISPLAY=0:0 in Ubuntu
- gedit filename.tcl (Xming application will be opened where you can type your program, save it, and close)
- ns filename.tcl
Happy Coding.
Great Content. It will be very much useful.
ReplyDeleteMatlab Training In Chennai
Matlab Course In Chennai