1 min read

Networking Commands on macOS Tahoe

macOS Tahoe includes a robust suite of networking utilities accessible via the Terminal. These tools allow you to troubleshoot connectivity, analyze network traffic, and manage remote connections.

Checking Connectivity

Ping

The most basic tool to check if a host is reachable.

ping google.com

Press Ctrl + C to stop the ping.

Network Interfaces

IP Address

To quickly get your local IP address for the Wi-Fi interface (en0 is usually Wi-Fi on MacBooks):

ipconfig getifaddr en0

Detailed Interface Config

To see detailed information about all network interfaces:

ifconfig

DNS Lookup

Dig

dig (Domain Information Groper) is the standard tool for querying DNS name servers.

dig google.com

Network Statistics

Netstat

Print network connections, routing tables, and interface statistics.

netstat -nr

Open Ports

lsof

To see which applications are listening on which ports:

sudo lsof -i -P | grep LISTEN

Remote Management

SSH (Secure Shell)

Log into a remote machine securely.

ssh user@remotehost.com

SCP (Secure Copy)

Transfer files securely between hosts.

scp file.txt user@remotehost.com:/path/to/destination/