how to stop a port from process code example Example: stop a process running on a port ubuntu sudo kill -9 `sudo lsof -t -i:9001`