I need to run sudo service postgresql start
every time when I start Ubuntu on WSL2.
How can I make the service start automatically when I start Ubuntu?
WSL doesn't use systemd, so sudo systemctl enable postgresql
doesn't work.
$ sudo systemctl status postgresqlSystem has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
Is there a standard way to start a service at startup?
Edit
I want to start the service on Ubuntu startup, not on Windows startup.