WSL (Windows Subsystem for Linux) - Running Linux on Windows
Installing Ubuntu Linux
Before installing, you need to make sure you have the latest version of WSL. You should have this version or higher, and Ubuntu-24.04.
wsl --version
# Should show WSL version 2.4.11.0
wsl --list
# Should include Ubuntu-24.04
Installing is simple using the command
wsl --install -d Ubuntu-20.04
If you wanted Debian Linux you can use -d Debian
Setting up users
sudo useradd -m -s /bin/bash -G sudo,docker <your username>
Modify the /etc/wsl.conf file to change the username from “default_developer” to
cat <<EOF | sudo tee -a /etc/wsl.conf
[boot]
systemd=true
[user]
default=<your username>
EOF
# If prompted, this would still be using the "default" sudo password.
After when you restart WSL, you’ll be logged in as that user.
Installing Docker
After Ubuntu is installed, you can install docker using
curl -fsSL https://get.docker.com -o install-docker.sh
# Then
sudo sh install-docker.sh