System has not been booted with systemd as init system (PID 1) Can't operate | How to Fix 100% wsl
ฝัง
- เผยแพร่เมื่อ 30 ก.ย. 2024
- [Fixed] System has not been booted with systemd as init
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
Systemd support is now available in WSL!
devblogs.micro...
Learn how to fix the error 'System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down' quickly and effectively. Follow step-by-step instructions to troubleshoot and resolve this issue on your Linux system. Perfect for beginners and advanced users alike! Watch now for a seamless solution to get your system running smoothly again.
1. What is systemd?
Systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system.
2. How can you get systemd on your machine?
To get started, you will need to do these two things: - Ensure you are running the right version of WSL: Version 0.67.6 and above - Set the systemd flag set in your WSL distro settings.
3. Set the systemd flag set in your WSL distro settings
You will need to edit the wsl.conf file to ensure systemd starts up on boot.
Mastering Windows Subsystem for Linux: Run Linux on Windows without virtual machine. WSL2 tutorial :
• Mastering Windows Subs...
#wsl #linux #windows11 #windows10 #windows #redhat #ubuntu #centos #centos8 #wsl2 #windowstutorials #terminal
omg thank you bro😍
How to save this file system=true plz help me
Hi, after you write:
[boot]
systemd = true
Press Esc button on your keyboard. Then type :wq! and press Enter button.
This will save your changes and exit vim editor.
@@LinuxTechHub THANKS
I add the command y wsl config and i had the same problem :( help me
I am not able to do it.😢 Please 🙏 help me 🙏
Hi, could you please tell me the error you are getting.
Also pls check if wsl.conf file has been properly edited as mentioned in the video.
Ho gaya ❤
After writing [Boot] systemd=true, I can't write this term: wql, I can't write it smoothly even by pressing the Esc button on the keyboard.
Hi,
If you are trying to edit the wsl.conf file as a normal user then you need sudo privilege.
Type:
sudo vi /etc/wsl.conf
[boot]
systemd = true
then press Esc key on your keyboard, then type :wq! (all in lower case) and press Enter. This will save your changes and exit Vim without errors.
Hi
i am having this issue
After i have saved according to ur explaination like this
[boot]
systemd = true
Press Esc button on your keyboard. Then type :wq! and press Enter button.
i also did this which worked
cat /etc/wsl.conf
[boot]
systemd = true
now my problem here is here
C:\Users\HP> wsl -t Ubuntu-20.04
i did this but there was no response. i did not even see the feedback it gives "operation successful" there was no feedback at all. now am still encountering the same problem which is this
reboot
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
kindly assist me on what to do.
Hi,
Try this command and check if it works:
wsl --shutdown
This command will terminate all running distributions and the wsl2 lightweight VM.
@@LinuxTechHub Alright thanks
im using wsl to connect ubuntu 22.04 to vs code on my windows 10 even when a change the /etc/wsl.conf file i keep getting the same error could help me please and thank you for your effort
Hi, kindly check if you are running the right version of WSL: Version 0.67.6 and above required.
1. Check your version number by running: wsl --version on CMD or PowerShell
2. To check for any WSL updates available run: wsl --update on CMD or PowerShell
Add these lines to the /etc/wsl.conf
[boot]
systemd=true
Then exit your Ubuntu distro and run, wsl.exe --shutdown from PowerShell.
Then run "wsl -d Ubuntu" to restart your ubuntu distro.
pls help me again
service apache2 start
Starting Apache httpd web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80 (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open lo
Hi,
Ensure you are starting Apache with root privileges. Use sudo before the command: sudo service apache2 start
Edit the Apache configuration file & check if it helps:
sudo nano /etc/apache2/apache2.conf
ServerName your_domain.com (replace your_domain.com with your actual domain)
Pls how can i contact u pls
Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ServerName 127.0.0.1
Look where i put it
about the domain what is that
Is it same as my server name
Look what it showed me
┌──(kali㉿localhost)-[~]
└─$ sudo service apache2 start
Starting Apache httpd web server: apache2/usr/sbin/apache2ctl: 102: ulimit: error setting limit (Operation not permitted)
Setting ulimit failed. See README.Debian for more information.
I'm using the debian 11 server and after upgrading the kernel packages i have faced the same error and because of systemd is not running my ssm agent is not working.
What steps should i follow here ?
Could u please help me ?
Hi, please check if this helps:
Install systemd-sysv package:
# apt-get install systemd-sysv
Then reboot and check if systemd is working:
# reboot
@@LinuxTechHub thank u so much for helping and it really worked and none of the articles were working...
There is a lot to learn from you..
Thank u so much again😊
Thank you very much for your kind words!!! Kindly support me by subscribing to my channel and share with your friends and colleagues.
PLs help
E492: Not an editor command: wql
Press ENTER or type command to continue
Hi, To save the vi editor first press Esc button on keyboard. Then type :wq! All in small letters.
To properly save and exit Vi editor, ensure you are in command mode (press Esc on your keyboard), then type :wq! and press Enter. This will save your changes and exit Vim without errors.
If you mistakenly typed :wql instead of :wq!, Vi doesn't recognize it as a valid command (E492 error) and prompts you to continue or enter a valid command.
Thanks man ❤
Hii
Hello I am having this same error in the Kali Linux. But I am not using WSL. How to fix it ?
Hello, Run below command on the terminal:
commnad ps -p 1 -o comm=
If it show init or sysv, or something like that, in the output, then your system is not using systemd.
Then in that case you should use the equivalent sysvinit commands like below:
For reboot -> sudo init 6
To start a service -> service service_name start
To stop a service -> service service_name stop
To enable a service -> service service_name enable
@@LinuxTechHub systemd
@@LinuxTechHub Systemd. Thanks
Still not working sir