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

ความคิดเห็น • 34

  • @kaungkaung-s2k
    @kaungkaung-s2k 10 วันที่ผ่านมา

    omg thank you bro😍

  • @justinseagull-lu4rg
    @justinseagull-lu4rg หลายเดือนก่อน

    How to save this file system=true plz help me

    • @LinuxTechHub
      @LinuxTechHub  หลายเดือนก่อน +1

      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.

    • @justinseagull-lu4rg
      @justinseagull-lu4rg หลายเดือนก่อน

      @@LinuxTechHub THANKS

  • @carloselcrack534
    @carloselcrack534 19 วันที่ผ่านมา

    I add the command y wsl config and i had the same problem :( help me

  • @saitan_rider
    @saitan_rider 3 หลายเดือนก่อน +1

    I am not able to do it.😢 Please 🙏 help me 🙏

    • @LinuxTechHub
      @LinuxTechHub  3 หลายเดือนก่อน

      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.

    • @saitan_rider
      @saitan_rider 2 หลายเดือนก่อน +1

      Ho gaya ❤

  • @shahanawazkhan8745
    @shahanawazkhan8745 2 หลายเดือนก่อน

    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.

    • @LinuxTechHub
      @LinuxTechHub  2 หลายเดือนก่อน +1

      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.

  • @JenniferChinelo-fk2wx
    @JenniferChinelo-fk2wx หลายเดือนก่อน

    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.

    • @LinuxTechHub
      @LinuxTechHub  หลายเดือนก่อน

      Hi,
      Try this command and check if it works:
      wsl --shutdown
      This command will terminate all running distributions and the wsl2 lightweight VM.

    • @JenniferChinelo-fk2wx
      @JenniferChinelo-fk2wx 27 วันที่ผ่านมา +1

      @@LinuxTechHub Alright thanks

  • @ismailchiba3513
    @ismailchiba3513 3 หลายเดือนก่อน

    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

    • @LinuxTechHub
      @LinuxTechHub  3 หลายเดือนก่อน

      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.

  • @ibrahimmuhammad4030
    @ibrahimmuhammad4030 3 หลายเดือนก่อน

    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

    • @LinuxTechHub
      @LinuxTechHub  3 หลายเดือนก่อน +1

      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)

    • @ibrahimmuhammad4030
      @ibrahimmuhammad4030 3 หลายเดือนก่อน

      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

    • @ibrahimmuhammad4030
      @ibrahimmuhammad4030 3 หลายเดือนก่อน

      about the domain what is that
      Is it same as my server name

    • @ibrahimmuhammad4030
      @ibrahimmuhammad4030 3 หลายเดือนก่อน

      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.

  • @madhuammu254
    @madhuammu254 หลายเดือนก่อน

    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 ?

    • @LinuxTechHub
      @LinuxTechHub  หลายเดือนก่อน

      Hi, please check if this helps:
      Install systemd-sysv package:
      # apt-get install systemd-sysv
      Then reboot and check if systemd is working:
      # reboot

    • @madhuammu254
      @madhuammu254 หลายเดือนก่อน

      ​@@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😊

    • @LinuxTechHub
      @LinuxTechHub  หลายเดือนก่อน

      Thank you very much for your kind words!!! Kindly support me by subscribing to my channel and share with your friends and colleagues.

  • @ibrahimmuhammad4030
    @ibrahimmuhammad4030 3 หลายเดือนก่อน

    PLs help
    E492: Not an editor command: wql
    Press ENTER or type command to continue

    • @LinuxTechHub
      @LinuxTechHub  3 หลายเดือนก่อน

      Hi, To save the vi editor first press Esc button on keyboard. Then type :wq! All in small letters.

    • @LinuxTechHub
      @LinuxTechHub  3 หลายเดือนก่อน +1

      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.

    • @ibrahimmuhammad4030
      @ibrahimmuhammad4030 3 หลายเดือนก่อน

      Thanks man ❤

  • @saitan_rider
    @saitan_rider 3 หลายเดือนก่อน

    Hii

  • @SunLISunTube
    @SunLISunTube 2 หลายเดือนก่อน

    Hello I am having this same error in the Kali Linux. But I am not using WSL. How to fix it ?

    • @LinuxTechHub
      @LinuxTechHub  2 หลายเดือนก่อน +1

      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

    • @SunLISunTube
      @SunLISunTube 2 หลายเดือนก่อน

      @@LinuxTechHub systemd

    • @SunLISunTube
      @SunLISunTube 2 หลายเดือนก่อน

      @@LinuxTechHub Systemd. Thanks

    • @pudurukoushik6865
      @pudurukoushik6865 หลายเดือนก่อน

      Still not working sir