Enable systemd in WSL

  • update wsl (in powershell)
wsl --update
  • edit /etc/wsl.conf file and append/add [boot]
[automount]
options = "metadata"
[boot]
systemd=true
  • shutdown wls
 wsl --shutdown
  • Open WSL and check
apt install nginx -y

systemctl status nginx

#OR you can install docker directly in WSL
wsl -l

wsl -l -v
  • https://www.xda-developers.com/how-enable-systemd-in-wsl/

Published by

Leave a Reply

Your email address will not be published. Required fields are marked *