Find Your Default Gateway with route -n get default
Query the macOS routing table for the active default gateway, source address, and interface.
01Command
$ route -n get default
# Gateway for a specific destination:
route -n get 8.8.8.802What it does
`route get` asks the kernel how it would route a packet and reports the gateway, interface (e.g. en0 or utun3), source IP, and even the destination MTU — much more precise than eyeballing `netstat -rn`. The `-n` flag skips reverse DNS lookups so the answer is instant. When a VPN or second network is active, this instantly reveals which interface wins for a given address.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- route — macOS Command ReferenceEvidence: Documents the get subcommand and -n (no DNS resolution) flag.
Last verified: 2026-09-17 · Category: Network
06Related solutions
Erase the broken Spotlight database so macOS re-indexes your drive from scratch.
Read the serial number, model identifier and chip without opening About This Mac.
See how many charge cycles the battery has used and its health condition.