how to search running process on port and kill ubuntu code example
Example 1: ubuntu check process on port
sudo lsof -i:22
Example 2: ubuntu kill process on a port
sudo kill -9 $(sudo lsof -t -i:4000)
sudo lsof -i:22
sudo kill -9 $(sudo lsof -t -i:4000)