Skip to content

Instantly share code, notes, and snippets.

View stephensabatini's full-sized avatar
“Even the smallest person can change the course of the future.” – Galadriel

Stephen Sabatini stephensabatini

“Even the smallest person can change the course of the future.” – Galadriel
View GitHub Profile
4wk- /
Last active June 21, 2024 10:34
Clean uninstall then reinstall of WSL on Windows 10, with systemD support

Uninstall then reinstall WSL on Windows 10 (clean way)


I've been using wsl (version 2) with genie mod for years without issue, but one day, Windows 10 finally catch up on wsl Windows 11 features and gives us a way to use systemD natively.

I wanted to use the new "right way" to enable systemD on Windows Subsystem for Linux (without genie), and I also had a (probably related) infinite Windows RemoteApp error poping in.

Fixing it

A - Uninstall wsl and related stuff

  1. In powershell (as admin)
stephensabatini /
Last active May 7, 2020 08:30
These are the `wp_usermeta` fields associated with a specific user in WordPress to define their role/permissions in the database.

WordPress Roles


wp_capabilities a:1:{s:13:"administrator";b:1;}
wp_user_level 10


wp_capabilities a:1:{s:6:"editor";b:1;}

coltenkrauter / fix-wsl2-dns-resolution
Last active June 19, 2024 12:38
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and