Sunday, June 8, 2025

  Step-by-Step: Install Ubuntu Using WSL on Windows

Step 1: Enable WSL and Virtual Machine Platform

Open PowerShell as Administrator and run:

wsl --install

This will install WSL 2, the latest version with full Linux kernel support.

🔸 If WSL is already installed, make sure it's version 2:

wsl --set-default-version 2

Step 2: Install Ubuntu from Microsoft Store

  1. Open Microsoft Store.

  2. Search for "Ubuntu".

  3. Choose your version (e.g., Ubuntu 22.04 LTS).

  4. Click Install.


🔹 Step 3: Set Up Ubuntu

After install:

  1. Launch “Ubuntu” from Start menu.

  2. Wait for it to extract and initialize.

  3. Create a new UNIX username and password.


  4. Step 4: Install Development Tools in Ubuntu (optional)

  5. Inside the Ubuntu terminal:

  6. sudo apt update && sudo apt upgrade -y

    sudo apt install php mysql-server composer nodejs npm git curl unzip -y

  7. composer global require laravel/installer

You need to install the “Remote - WSL” extension inside Visual Studio Code, not from the terminal.

🔹 Step-by-Step to Fix:

  1. Open VS Code

  2. Go to the Extensions view:

    • Shortcut: Ctrl + Shift + X

    • Remote - WSL

    • After Installing:

      To open a WSL Ubuntu project:

      • Press F1 or Ctrl + Shift + P

      • Type:

      • WSL: Open Folder

      🔹 2. Generate SSH Key Pair

    • ssh-keygen -t ed25519 -C "your_email@example.com"

No comments:

Post a Comment