WSL

Icon  Name                      Last modified      Size  Description
[PARENTDIR] Parent Directory - [   ] bashrc 2023-09-13 10:36 1.0K [DIR] cuda/ 2022-01-22 23:39 - [DIR] distrod/ 2021-11-08 10:13 - [DIR] distros/ 2024-04-23 12:46 - [DIR] Fix/ 2023-03-13 21:04 - [TXT] guest-etc-resolv-conf.txt 2021-12-04 11:13 19 [TXT] guest-etc-wsl-conf.txt 2021-12-04 11:12 37 [DIR] INSTALL/ 2024-04-23 12:50 - [DIR] install/ 2023-02-13 21:56 - [DIR] perf/ 2021-12-08 22:19 - [DIR] static-ip/ 2022-01-16 11:54 - [DIR] user/ 2023-08-24 18:07 - [DIR] wslg/ 2022-01-04 14:38 -
First time install

(Turn Windows Features on or off) → check [X] Windows Subsystem for Linux

(reboot)

(Microsoft Store)
search "Ubuntu 24.04 LTS"
click "Get" (downloads 341 MB)
click "Open" (starts installer, choose username etc...)

(Start Menu)
→ Ubuntu...

(Alacritty terminal + PowerShell)
wsl ~

(as user in Ubuntu, upgrade guest)
sudo -i
apt update && apt -y full-upgrade && apt autoremove && apt clean




Ubuntu 2310 -> 2404 Stop and uninstall old wsl -t Ubuntu wsl --unregister Ubuntu Install new wsl --install -d Ubuntu-24.04
Disable WSL2 swap (e.g. on crypted disks if no shortage of memory) notepad $env:userprofile\.wslconfig -- [wsl2] swap=0
wsl -l -v # decide or know do you need VERSION 1 or 2 wsl --set-default-version 2 # sometimes wsl --update wsl --shutdown GUI apps
Convert old guest to use wsl VERSION 2 wsl --shutdown wsl --update wsl --set-default-version 2 wsl -l -v # see distro name, e.g. wsl --set-version Debian 2 # wait for conversion wsl -l -v in guest, $ uname -r 5.10.60.1-microsoft-standard-WSL2
Debian # /etc/resolv.conf # snafu, maybe because of VPN of the host? # # remove symlink, make real file with row nameserver 1.1.1.1 # /etc/wsl-conf [network] generateResolvConf = false # to re-run /init ( no systemd :) from outside wsl.exe --shutdown wsl.exe -l -v apt install ca-certificates apt update && apt -y full-upgrade && apt -y autoremove && apt autoclean && apt clean cache apt install bat git jq ksh mlocate openssh-client tig vim update-alternatives --config editor # add /mnt to PRUNEPATHS in /etc/updatedb.conf, don't read windows files updatedb alias bat='batcat'
openSUSE-Tumbleweed # cat: /etc/resolv.conf: No such file or directory # same dangling symlink # same snafu as Debian, same host, same VPN... # one shot quick fix: rm /etc/resolv.conf && echo nameserver 1.1.1.1 > /etc/resolv.conf # permanent fix as in Debian zypper dup zypper in bat git jq ksh mlocate tig
Paths, storage usage C:\Users\...\AppData\Local\Packages /mnt/c/Users/.../AppData/Local/Packages fresh default installs with full updates + packages above: - Debian 820 MB - openSUSE Tumbleweed 990 MB in Packages folder also see [distroname]/LocalState/ext4.vhdx