Installing WSL 2 with Ubuntu on Windows
Windows Subsystem for Linux (WSL) allows you to run a Linux distribution alongside your Windows installation. This step-by-step guide will walk you through the process of installing WSL 2 with Ubuntu on Windows.
Windows 10 or 11: Ensure you are using a Windows Operating System.
Administrator Privileges: You need administrative privileges to enable WSL.
Internet Connection: An active internet connection is necessary to download Ubuntu from the Microsoft Store.
Enabling WSL on Windows
- Open PowerShell as Administrator.
Run the following command to enable WSL 2:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable Virtual Machine Platform feature:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your computer to apply the changes.
Installing Ubuntu on WSL 2
Open PowerShell as Administrator and run the command:
Open the Microsoft Store and search for "Ubuntu". Select Ubuntu from the search results.
Click "Get". Wait for the installation to complete.
Configuring Ubuntu on WSL 2
- Launch Ubuntu from the Start menu or by typing "ubuntu" in the Windows search bar.
Set up your UNIX username and password (student/student) when prompted. Remember these credentials; you will need them later.
Ubuntu will complete its installation, and you will be prompted to enter your username and password to log in.
Congratulations! You have successfully installed WSL 2 with Ubuntu on your Windows OS. You can now enjoy a Linux-like environment directly within your Windows OS.