This guide will help you set up your environment for networking labs using Linux headers and tools (like <sys/socket.h>
, <arpa/inet.h>
, etc.) with WSL and VS Code.
-
Install WSL & Ubuntu
Open PowerShell as Administrator and run:wsl --install
This installs WSL 2 along with the default Ubuntu version. Restart your system when prompted.
-
Verify Ubuntu Installation
After rebooting, search for Ubuntu in the Start Menu and open it. Set your UNIX username and password. -
(Optional) Install a Specific Ubuntu Version
If you want a specific version (e.g., Ubuntu 22.04), run:wsl --install -d Ubuntu-22.04
-
Install VS Code and WSL Extension
- Open VS Code and install the Remote - WSL extension from the Extensions tab.
-
Install Required Tools
To install essential tools likegedit
,gcc
, andbuild-essential
, run the following commands in the Ubuntu terminal:sudo apt update && sudo apt upgrade -y sudo apt install gedit gcc build-essential
These tools are necessary for compiling and editing your networking programs.
You can create two separate WSL terminals for running server and client programs. Here's an example setup:
For a detailed walkthrough, check out this YouTube video (only the first half is necessary):
🎥 Install Windows Subsystem for Linux on Windows 11 - YouTube
Now you're all set to run networking code with full Linux support in VS Code on your Windows system 🚀
- Transmission Control Protocol (TCP)
- User Datagram Protocol (UDP)
- Stop and Wait ARQ (SnW)
- Go Back N ARQ (GbN)
- Selective Repeat ARQ (SR)
- Distance Vector Routing Protocol Algorithm (DVR)
- File Transfer Protocol (FTP)
- Leaky Bucket Algorithm (LB)