yosukes-dev/AmazonWSL

Service command not found

Closed this issue · 4 comments

uanid commented

When I run command service docker start
The console says -bash: service: command not found

How do I run service command?

I tried to search service binary to /usr/sbin, /sbin, /usr/bin, etc...
But I can't find the service binary anywhere.

Amazon Linux 2 comes with the same benefits as Amazon Linux, but it adds some new capabilities:
systemd: replacing SystemVinit

This means you have to use systemctl instead of the service command.
But currently systemd does not work with WSL.
So, you need to use a helper like genie.

Please try the following steps.

1 yum upgrade -y && yum update -y
2 amazon-linux-extras install -y kernel-ng

#6 (comment)

i have made few modifications on @shayne wsl2-hacks repo to get systemd support on Amazon Linux.
Please follow this steps WSL2 Amazon Linux systemd support

uanid commented

@volkancakil Great work!!