- WSL 1: A compatibility layer that translates Linux syscalls to Windows ones.
- WSL 2: A full Linux kernel running in a lightweight VM, offering better performance, full system call compatibility, and full Docker support.
Installation & Setup
Ensure your Windows 10 version is 2004 or higher (Build 19041+) or you’re using Windows 11. For older systems, refer to the manual installation docs.In most cases, no restart is required. However, if
wsl --install fails, manually enable the features via Start Menu > “Turn Windows features on or off”:After completing the steps above, a new Ubuntu application will appear in your Start Menu. Launch it — setup takes a few minutes.
You will be prompted to create a UNIX username and password. This user account is separate from your Windows account and will have
sudo privileges.PS C:\Users\karchunt> wsl --install
Downloading: Ubuntu
Installing: Ubuntu
Distribution successfully installed. It can be launched via 'wsl.exe -d Ubuntu'
Launching Ubuntu...
Provisioning the new WSL instance Ubuntu
This might take a while...
Create a default Unix user account: karchunt
New password:
Retype new password:
passwd: password updated successfully
karchunt@DESKTOP-CCAQ09F:/mnt/c/Users/karchunt$
Basic WSL Management Commands
List available Linux distributions
List installed Linux distributions
terminal
Change the WSL version for a distribution
Set WSL 2 as the default version
Set the default Linux distribution
Terminate a running distribution
Shut down all WSL distributions
Core WSL Usage & File System
Accessing Windows files from WSL
WSL automatically mounts your Windows drives under/mnt. Your C: drive is accessible at /mnt/c.
Running Windows executables from WSL
WSL Configuration (.wslconfig)
Configure global WSL settings using a.wslconfig file located at C:\Users\<YourUsername>\.wslconfig.
.wslconfig
.wslconfig, shut down WSL for the changes to take effect: