JavaEar 专注于收集分享传播有价值的技术资料

System has not been booted with systemd as init system (PID 1). Can't operate

I'm trying to follow the Redis installation process as discuss in this article of digital ocean, in WSL. The Ubuntu version installed is Ubuntu 18.04.

Everything in redis installation is fine but when I tried to run this sudo systemctl start redis I got this message.

System has not been booted with systemd as init system (PID 1). Can't operate.

Any Idea on what should I do with that?

3个回答

    最佳答案
  1. Instead, use: sudo service redis-server start

    I had the same problem, stopping/starting other services from within Ubuntu on WSL. This worked, where systemctl did not.

    And one could reasonably wonder, "how would you know that the service name was 'redis-server'?" You can see them using service --status-all

  2. 参考答案2
  3. Instead of using sudo systemctl start redis use: sudo /etc/init.d/redis start

    as of right now we do not have systemd in W

  4. 参考答案3
  5. I think the reason is u set all the things right followed the instruction on the website u follow but u forget the most important one, u haven't installed a real Linux system! find a USB or virtual box and install it, and boom, that should work!