🐧 How to install Linux on Windows with WSL
The Windows Subsystem for Linux (WSL) lets developers install a Linux distribution (such as Ubuntu, OpenSUSE, Kali, Debian, Arch Linux, etc) and use Linux applications, utilities, and Bash command-line tools directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.
Install WSL Command
Open PowerShell or Windows Command
wsl --install
# or
wsl --list --online # For a valid list of distribution names
wsl --install -d <Distribution Name>
Add a User for WSL (Optional)
adduser <username>
usermod -aG sudo <username> # Add user to sudoers
Install Visual Studio Code
Use Windows Proxy
Ubuntu version at least to be 22.04
In your %UserProfile%
directory(use cd ~
to access your home directory, which is typically your user profile, C:\Users\<UserName>
), create .wslconfig
file, paste the following configurations into it:
[wsl2]
networkingMode=mirrored
After configured this, you need to run wsl --shutdown
to stop WSL first, and then relaunch terminal
Install zsh
sudo apt install zsh
chsh -s $(which zsh) # Make zsh the default shell. Without sudo, if you use sudo it will change the shell not for your working user but for root
- Install oh-my-zsh
- Change theme
Install Homebrew
Useful Commands
explorer.exe . # Open current folder in windows
Additional Information
- Size: 72 x 20
- Theme: Campbell
- Opacity: 95%