For many years, macOS included a graphical application called Network Utility, which provided an easy-to-use interface for common troubleshooting tools like Ping, Traceroute, Whois, and Port Scanning. Starting with macOS Big Sur, Apple deprecated and removed the graphical Network Utility app, forcing users to rely on the Terminal. Fortunately, all the underlying UNIX tools that powered the Network Utility are still fully functional via the command line.
1. Ping (Testing Connectivity)
The Ping tool tests whether your Mac can reach a specific IP address or domain name. Unlike the old Network Utility which stopped after 10 pings by default, the Terminal ping command runs infinitely until you stop it.
ping google.com
To stop the ping, press Control + C.
If you want to limit the ping to exactly 5 requests (replicating the old GUI behavior), use the -c flag:
ping -c 5 google.com
2. Traceroute (Tracing the Network Path)
Traceroute shows the exact path a packet takes from your Mac to the destination server, listing every router (hop) along the way. This is crucial for determining where a connection is dropping or slowing down.
traceroute 8.8.8.8
3. Whois (Domain Information)
The Whois tool queries public databases to retrieve registration information about a domain name, including who owns it, where it is hosted, and when it expires.
whois apple.com
4. Port Scan (Netcat)
The Network Utility featured a simple port scanner. On the command line, the equivalent tool is nc (netcat). To scan a remote server (e.g., 192.168.1.50) to see if specific ports (like 80 and 443) are open, use the following syntax:
nc -zv 192.168.1.50 80 443
To scan a range of ports (e.g., ports 20 to 100), use a hyphen:
nc -zv 192.168.1.50 20-100
-ztells netcat to only scan for listening daemons, without sending any data.-venables verbose mode to show the results on the screen.
5. Netstat (Network Statistics)
To view your Mac’s current routing tables and active network connections, use the netstat command. To replicate the most common Network Utility routing table view, run:
netstat -nr
While the loss of the graphical Network Utility is unfortunate for some users, mastering these native Terminal commands provides a much faster and more flexible method for diagnosing network issues on modern macOS systems.