-
Notifications
You must be signed in to change notification settings - Fork 0
WSL2
fistralpro edited this page Jul 24, 2023
·
2 revisions
https://docs.microsoft.com/en-us/windows/wsl/ // from powershell running as admin
wsl --set-default-version 2 (so as not to be wsl 1)
wsl --set-version ubuntu-20.04 2 (this is the distro we will use)
wsl -l -v (list versions available * will be currently in use)
wsl --install --distribution <Distribution Name>
wsl ~ (change directory to "users" home)
wsl --distribution <Distribution Name> --user <User Name> (run a specific Linux distribution with a specific user)
wsl --update (update linux kernel)
wsl --shutdown
now you can run the ubuntu app from your start menu
We can backup with:
# wsl --export <distro> <filename.tar>
wsl --export Ubuntu my_backup.tar
We can delete with:
# wsl --unregister <distro>
wsl --unregister Ubuntu
We can restore a backup with:
# wsl --import <distro> <install location=""> <filename>
wsl --import Ubuntu . my_backup.tar
no actual root, just use sudo:
sudo su
(it typically set unsecure passwords to password) or Open Ubuntu via windows app