Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 826 Bytes

wsl_genie.md

File metadata and controls

33 lines (24 loc) · 826 Bytes

Run Systemd services / Containers on WSL 2

Thanks to Genie

Successfuly tested Ubuntu 20.04 Focal Fossa form @cerebrate

sudo apt install daemonize dbus policykit-1 systemd

# add Microsoft repo with .Net 3.1 runtime
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

curl -s https://packagecloud.io/install/repositories/arkane-systems/wsl-translinux/script.deb.sh | sudo bash
sudo apt install -y systemd-genie

Add configuration /usr/lib/genie/deviated-preverts.conf:

{
  "daemonize": "/usr/bin/daemonize",
  "mount": "/bin/mount",
  "runuser": "/sbin/runuser",
  "systemd": "/bin/systemd"
}

Restart WSL with Genie

wsl.exe genie -i