Let’s start the discussion about How to stop a process running on a port in Ubuntu in following methods.
Everything is treated as a file by the Linux operating system. To begin, use the Linux command lsof (List of Open Files) to identify the process id (PID) of any active process on any port. Then, using the PID, use the kill command to terminate that process.
Run the below command by modifying the port number. Below considered port number as 3000
sudo kill -9 `sudo lsof -t -i:3000`
I hope the strategies listed above work for you. Happy coding and come back again.
Similar Post : How to list all services using systemctl