Change default user at logging
Systems in WSL2 are standard linux distribution. We can treat it as a normal linux system without desktop.
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
# List available Linux distributions
wsl --list --online
# install
wsl --install <Distribution Name>
# List installed linux distributions
wsl --list --verbose
Install a linux distribution using iso file (Not tested)
Instructions on how to install a custom distro in WSL2 (Windows SubSystem for Linux 2)
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
wsl hostname -i
for the IP address of your Linux distribution installed via WSL 2 (the WSL 2 VM address)cat /etc/resolv.conf
for the IP address of the Windows machine as seen from WSL 2 (the WSL 2 VM)wsl --unregister <DistributionName>
WSL2 + Ubuntu 22.045