On macOS Big Sur
and later, use this command:
sudo lsof -i -P | grep LISTEN
or to just see just IPv4:
sudo lsof -nP -i4TCP:$PORT | grep LISTEN
2023-10-29 10:46:16
On macOS Big Sur
and later, use this command:
sudo lsof -i -P | grep LISTEN
or to just see just IPv4:
sudo lsof -nP -i4TCP:$PORT | grep LISTEN