WSL 2 INSTALLATION
⚙️ WSL2 Offline Setup (Internet Machine → Intranet Machine)
This guide explains how to install WSL2 on an internet-enabled system and transfer it to an intranet (offline) system.
💻 STEP 1: On Internet Machine
Install WSL
wsl --install
Update WSL (Optional)
wsl --update
Check Version
wsl --version
Check Status
wsl --status
List Installed Distros
wsl --list --verbose
Shutdown WSL (Important)
wsl --shutdown
Export Ubuntu
wsl --export Ubuntu ubuntu.tar
📦 STEP 2: Copy Files
- ubuntu.tar
- wsl_update_x64.msi
💻 STEP 3: On Intranet Machine
Enable Features
dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your system
Install Kernel
wsl_update_x64.msi
Set WSL2
wsl --set-default-version 2
Import Ubuntu
wsl --import Ubuntu C:\WSL\Ubuntu C:\path\ubuntu.tar
Run Ubuntu
wsl -d Ubuntu
⚠️ Correction
wsl install ❌
--download powershell ❌
wsl --install ✅
No command like --download powershell
🚀 Commands Summary
| Command | Purpose |
|---|---|
| wsl --install | Install WSL |
| wsl --version | Check version |
| wsl --status | Check status |
| wsl --export | Create portable Linux |
🔥 Use Case
- 1. Running Linux inside Windows
- Windows Subsystem for Linux 2 lets you use Ubuntu/Linux commands directly in Windows
- 👉 No need to install a separate OS
- ✔ Useful for:
- Python, Node.js, AI tools
- Bash scripting
- Linux-based development
- 🔹 2. Docker (MOST IMPORTANT for you)
- Docker Desktop uses WSL2 as backend
- 👉 Helps in:
- Running containers
- Managing images
- Creating portable environments
- ✔ Without WSL2 → Docker won’t work properly on Windows
Comments
Post a Comment