How to get the PID and kill the port?

# get the process id (pid) of the port
$ sudo lsof -i :1234

# use the pid you received a step before and kill the process
$ sudo kill -9 <PID>
Copy

September 26th, 2019

# Kill a specific port via Terminal

Add to bookmarks

If a port is in use and you need it, use your Terminal to kill the process.

HomeBookmarks