DamionGans / ubuntu-wsl2-systemd-script

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

How to completely remove all changes? #71

Open utkarshsethi opened 2 years ago

HWZen commented 2 years ago

Same question. I back to wsl1, but this script also alive, but not used. When I run some app, termial echo

Sleeping for 1 second to let systemd settle
Sleeping for 1 second to let systemd settle
Sleeping for 1 second to let systemd settle
Sleeping for 1 second to let systemd settle
....
HWZen commented 2 years ago

No description provided.

I found an uninstall marge from pull request. url hope it is helpful

utkarshsethi commented 2 years ago

No description provided.

I found an uninstall marge from pull request. url hope it is helpful

I had to do a complete reinstall of wsl2, as it was messing with my path.

n1klaus commented 2 years ago

This worked for me without having to reinstall ubuntu. Login from PowerShell wsl -e bash --norc then check the files

cd /usr/sbin
stat start-systemd-namespace
stat enter-systemd-namespace

Make sure the files are not linked to other files and then delete them from the filesystem

sudo rm start-systemd-namespace
sudo rm enter-systemd-namespace
0zero commented 2 years ago

I removed the files as @n1klaus suggested and ensured that the /etc/bash.bashrc file no longer sources start-systemd-namespace and I think everything works fine but I'm still getting * Error: Problem adding; giving up message everytime I start the wsl2 shell. I'm on windows 11 and using Ubuntu 22.04

Has anyone experienced similar?

UPDATE: Nevermind. I shutdown wsl and restarted it and all seems ok now

jacobavina commented 1 year ago

I used the script and now my Ubuntu terminal close immediately before opening it. How can I repair it?

sandeepsingh07 commented 1 year ago

Please follow below step:

This worked for me without having to reinstall ubuntu. Login from PowerShell wsl -e bash --norc then check the files

cd /usr/sbin stat start-systemd-namespace stat enter-systemd-namespace Make sure the files are not linked to other files and then delete them from the filesystem

sudo rm start-systemd-namespace sudo rm enter-systemd-namespace

jtyler1900 commented 1 year ago

sudo rm enter-systemd-namespace

Perfect and excellent. It works for me .

gopalofficial commented 1 year ago

I also followed the same step ,It worked

Login from PowerShell wsl -e bash --norc then check the files

cd /usr/sbin stat start-systemd-namespace stat enter-systemd-namespace Make sure the files are not linked to other files and then delete them from the filesystem

sudo rm start-systemd-namespace sudo rm enter-systemd-namespace