p:: CLI
Who is listening on a given TCP port on Mac OS X?
On macOS Big Sur and later, use this command:
sudo lsof -nP -i4TCP | grep LISTEN
Find process id on port
sudo lsof -i tcp:1883
To kill the PID:
sudo kill -9 <PID>
p:: CLI
On macOS Big Sur and later, use this command:
sudo lsof -nP -i4TCP | grep LISTEN
Find process id on port
sudo lsof -i tcp:1883
To kill the PID:
sudo kill -9 <PID>