← Learn
Safe
sudo lsof -i -P -n | grep LISTEN

macos · bash · Expert

Lists open network sockets and filters for listening ones. Root is needed to see other users' sockets; the pipeline only filters text, so this is a read-only inventory of what is accepting connections.

Think you can spot these under time pressure?

Start Training

More macOS