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
-
Open Microsoft Store.
-
Search for "Ubuntu".
-
Choose your version (e.g., Ubuntu 22.04 LTS).
-
Click Install.
🔹 Step 3: Set Up Ubuntu
After install:
-
Launch “Ubuntu” from Start menu.
-
Wait for it to extract and initialize.
-
Create a new UNIX username and password.
Step 4: Install Development Tools in Ubuntu (optional)
Inside the Ubuntu terminal:
sudo apt update && sudo apt upgrade -y
sudo apt install php mysql-server composer nodejs npm git curl unzip -y
- 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:
-
Open VS Code
-
Go to the Extensions view:
-
Shortcut:
Ctrl + Shift + X
Remote - WSL
After Installing:
To open a WSL Ubuntu project:
-
Press
F1
orCtrl + 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