Change default user at logging

Network related

Systems in WSL2 are standard linux distribution. We can treat it as a normal linux system without desktop.

Basic commands for WSL

Run Linux GUI Apps

sudo apt update
sudo apt install gedit -y
sudo apt install gimp -y
sudo apt install nautilus -y
sudo apt install vlc -y
sudo apt install x11-apps -y

Install Linux Distributions

# List available Linux distributions
wsl --list --online
# install
wsl --install <Distribution Name>
# List installed linux distributions
wsl --list --verbose

Export and Import

If you want to import your wsl backup in a new machine, you need to run wsl --install first.

wsl --export <Distribution Name> <FileName>
wsl --import <Distribution Name> <InstallLocation> <FileName>
# for example
wsl --import Ubuntu22 D:\\wsl\\ubuntu22 D:\\ubuntu2204.tar

Identify IP Address

Unregister or uninstall a Linux distribution

wsl --unregister <DistributionName>

Examples

WSL2 + Ubuntu 22.045