snippetbashTip
netstat — Display network-related information such as open connections, open socket ports, etc. See also: `lso
Viewed 0 times
relatedsuchcommandnetstatnetworkcliinformationdisplay
macos
Problem
How to use the
netstat command: Display network-related information such as open connections, open socket ports, etc. See also: lsof. More information: <https://keith.github.io/xcode-man-pages/netstat.1.html>.Solution
netstat — Display network-related information such as open connections, open socket ports, etc. See also: lsof. More information: <https://keith.github.io/xcode-man-pages/netstat.1.html>.Display the PID and program name listening on a specific protocol:
netstat -p {{protocol}}Print the routing table and do not resolve IP addresses to hostnames:
netstat -nrPrint the routing table of IPv4 addresses:
netstat -nr -f inetCode Snippets
Display the PID and program name listening on a specific protocol
netstat -p {{protocol}}Print the routing table and do not resolve IP addresses to hostnames
netstat -nrPrint the routing table of IPv4 addresses
netstat -nr -f inetContext
tldr-pages: osx/netstat
Revisions (0)
No revisions yet.