docs/development/setup/wsl-troubleshoot.md
WSL2 users often encounter issues where services fail to start or remain inactive. Follow the steps below to diagnose and resolve such problems.
To verify if a service is running, use the following command:
$ systemctl status <service_name>
If the service is inactive, you can attempt to start it with:
$ systemctl start <service_name>
Services like postgresql may fail to start due to port conflicts. These conflicts can be caused by:
To resolve port conflicts with another WSL2 instance, stop the conflicting instance using the following command:
> wsl -t <WSL_Instance_Name>
After stopping the conflicting instance, restart your WSL instance with:
> wsl -d <Your_Zulip_Instance_Name>
To resolve conflicts caused by Windows processes:
> Get-Process -Id (Get-NetTCPConnection -LocalPort <your_port_number>).OwningProcess
> taskkill /PID <pid> /F
After resolving port conflicts, try restarting the service using:
$ systemctl start <service_name>
To ensure the service always starts on boot, enable it with:
$ systemctl enable <service_name>
wsl --list to view all running WSL2 instances and their states.