After trying Debian in WSL, now I'm trying for something lighter, the Alpine distro.
- Having WSL (WSL2) activated
Open Microsoft Store and search for
Alpine WSL. Install and Open after it installed.
When you launch it at first, it will perform the installation setup and wait for it.
If your installation froze up to the last line like in the image above for like more than few minutes, try to close it and reopen alpine linux. Somehow the installation was actually completed.
cat /etc/os-release command to see the release information.
Alpine is powered with command tools named
apk, stands for Alpine Package Keeper. You can confirm it's installed by typing
apk and you will see the apk version and usage information.
To download and update the packages information to the latest, use this command:
You can browse for the available packages at pkgs.alpinelinux.org/packages or you can search it using CLI. Since Alpine Linux doesn't come with built-in editor like
nano in ubuntu, we have to install it as the demo.
apk search nano
Above commands will list available packages that has
nano on it's name.
But the straightforward to install it, just type this:
apk add nano
Check if the nano version actually matches the version in the latest available packages.
Now you can try to edit a file using nano. But maybe you have to create it first using
touch sample.txt and then you can
nano sample.txt afterward.
You can install python3 using apk command:
apk add python3
Confirm the python installation using
python3 --version. Just like what we've tried in Debian WSL, you can start a simpl python server using
python3 -m http.server 8000
http://localhost:8000 in your browser to confirm it.