My port related problems
How to find and kill the process running on a port on Ubuntu ?
sudo kill -9 `sudo lsof -t -i:9001`
How to find the process running on a port on Windows 11 using PowerShell ?
NETSTAT is a command that shows info about the active TCP/IP network connections. It accepts several options. In this case, we will use:
-n: Displays addresses and port numbers in numerical form. -o: Displays the owning process ID associated with each connection. -a: Displays all connections and listening ports; -p: Filter for a specific protocol (TCP or UDP)
netstat -ano | findstr :<PORT>
OR
netstat -noa -p TCP
Get PID that is using the port. Then use this command.
taskkill /PID 19160 /F