How to Set Up WSL on Windows

Step-by-step guide to install and configure Windows Subsystem for Linux (WSL) on Windows 10 and 11. Enable WSL, install Ubuntu, and start using Linux.

  1. Enable WSL in Windows Features. Open Start menu and search for 'Turn Windows features on or off'. Click the result to open Windows Features dialog. Scroll down and check 'Windows Subsystem for Linux'. Click OK and restart your computer when prompted.
  2. Enable Virtual Machine Platform. Return to Windows Features dialog after restart. Check 'Virtual Machine Platform' in addition to WSL. This enables WSL 2 which provides better performance. Click OK and restart again.
  3. Set WSL 2 as default version. Open PowerShell as Administrator. Run the command: wsl --set-default-version 2. This ensures new Linux distributions install as WSL 2 rather than the older WSL 1.
  4. Install a Linux distribution. Open Microsoft Store and search for 'Ubuntu'. Click on Ubuntu 22.04 LTS or your preferred version. Click 'Get' to download and install. Launch Ubuntu from Start menu when installation completes.
  5. Complete initial Ubuntu setup. Ubuntu will open a terminal window and prompt you to create a username and password. Enter a username (lowercase, no spaces) and press Enter. Type a password twice when prompted. This creates your Linux user account.
  6. Update the Linux system. Run the following commands in your Ubuntu terminal to update the package list and install updates: sudo apt update followed by sudo apt upgrade. Enter your password when prompted and type 'y' to confirm updates.
  7. Install Windows Terminal (recommended). Download Windows Terminal from Microsoft Store for a better terminal experience. Launch Windows Terminal and click the dropdown arrow next to the plus icon. Select Ubuntu to open your WSL environment in a modern terminal with tabs and customization options.

Related

  • How to Build a Smart Home System from Scratch
  • How to Securely Erase Your Android Phone Before Disposal
  • How to initiate your first Android backup
  • How to Fix Missing Apps After Android Data Transfer
  • How to Fix RCS Messaging Activation Issues on Android
  • Verifying Your Android Device Setup