Can't start postgresql on WSL Ubuntu

The answer of why you cannot use systemd is quite simple: WSL doesn't support it from day 1 and till now.This is a known issue, and you may refer to this issue opened in 2018 and this issue using a similar configuration of Windows and WSL for more information.

The problem of postgresql is another known issue. It is fixed in WSL 2. To solve this issue on WSL 1, this post tells you to set fsync=on and data_sync_retry=true. An alternative way to solve the problem is to set fsync=off. Refer to this issue for more information about fsync problem in WSL.


Service stop is just telling you that the service is down. It is not saying that it stopped the service.

When you are trying to find the postmaster PID, you are finding the PID of yourself trying to find the postmaster PID:

$ ps -ef | grep postmaster
me       300   116  0 15:36 tty3     00:00:00 grep postmaster

When you use curl to check port 5432, it is telling you that it got an empty reply. That means something is listening on port 5432. What you want to see is a "Failed to connect" message.

Are you running a postgresql server at port 5432 on the host Windows machine? If so, that will prevent your running one from inside of WSL, and you will not be able to see the process from there.

Please try changing your port to 5433 on the WSL side.