Name Last modified Size Description
Parent Directory -
2.3.11/ 2024-07-19 22:33 -
bashrc 2023-09-13 10:36 1.0K
cuda/ 2022-01-22 23:39 -
distrod/ 2021-11-08 10:13 -
distros/ 2024-04-23 12:46 -
Fix/ 2023-03-13 21:04 -
guest-etc-resolv-conf.txt 2021-12-04 11:13 19
guest-etc-wsl-conf.txt 2021-12-04 11:12 37
INSTALL/ 2024-04-23 12:50 -
install/ 2023-02-13 21:56 -
perf/ 2021-12-08 22:19 -
rhel-too/ 2024-11-20 17:06 -
rhel-yes/ 2024-11-20 17:08 -
static-ip/ 2022-01-16 11:54 -
to2/ 2023-11-20 00:00 -
user/ 2023-08-24 18:07 -
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
compact vdisk (if wsl2, in wsl1 you have shared files)
https://stephenreescarter.net/how-to-shrink-a-wsl2-virtual-disk/
find your disto name, in user PowerShell
wsl --list --all --verbose
shut it down, e.g.
wsl -t Ubuntu-24.04
find your file image, e.g. for Ubuntu C:\Users\username\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu24.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx
diskpart
select vdisk file='C:\Users\username\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu24.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx'
or e.g. ...TheDebianProject.DebianGNULinux_...
compact vdisk
(wait)
exit
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
|