DamionGans / ubuntu-wsl2-systemd-script

[Does not work anymore!] Script to enable systemd support on current Ubuntu WSL2 images
1.56k stars 383 forks source link

Added uninstall.sh #43

Open alanmburr opened 3 years ago

alanmburr commented 3 years ago

Looking through the Issues, I found a few users who wanted an uninstall script. So, I made one!

deepaksp commented 3 years ago

getting this error after running uninstall script

-bash: /usr/sbin/start-systemd-namespace: No such file or directory

alanmburr commented 3 years ago

Sorry, @deepaksp, sed wasn't working. The uninstall script now uses grep. Hopefully this works for you.

Sorry, @alanmburr.

lancer-sudo commented 2 years ago

omg, thank you very much for this pr. I met a problem that when I use wsl2(windows 10 vm like?) open the vscode, the path of the vscode terminal is not the path,where I use the command "code .".
This problem waste my hole day ToT. Finally I found that this tool will set an env "pwd", but the value of "pwd" is a path where I install the wsl(ubuntu), It should actually be the path to "pwd" in the virtual disk of wsl. So I'm trying to unstall this tool and find your PR. Think you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I can finally sleep T T😭

PCDSandwichMan commented 2 years ago

@wackyblackie You are an incredible human being. Thank you so much.

mrconnerton-encorehc commented 2 years ago

https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/

Gonna uninstall this so I can give the built in support now released a try

bhatsudo commented 2 years ago

@wackyblackie Thanks for the script! I installed the script, but now my WSL2 is not starting and shows the error

nsenter: failed to parse pid: '25..

So, now I can't even use the uninstall script. Any idea how I can resolve this? Thanks!

MightyCoderX commented 1 year ago

@bhatsudo I ran wsl like this

wsl.exe -u root
BHellstream commented 1 year ago

@wackyblackie Thanks for the script it was a life saver also thanks @MightyCoderX, that also saved me a lot of trouble.

wsl.exe -u root