Show IP, Router and DNS for a Network Service
Use networksetup -getinfo to print the full current configuration (IP, subnet, router, DNS) of Wi-Fi or Ethernet.
Run `networksetup -getinfo "Wi-Fi"` to see the IP address, subnet mask, router and DNS servers for that service.
01Command
Command
$ networksetup -getinfo "Wi-Fi"02What it does
This one command summarizes what normally takes several System Settings panes: whether the service uses DHCP or a manual address, the current IP, subnet mask, router and configured DNS. It's the quickest sanity check when a Mac "has Wi-Fi but no internet" — you immediately see if there's no IP or a wrong router. Use the service name exactly as shown by `networksetup -listallnetworkservices`.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- networksetup — configure network settings (macOS man page)Evidence: Documents `networksetup -getinfo <networkservice>` which prints IP address, subnet mask, router, DNS and whether the configuration is DHCP or manual.
Last verified: 2026-09-18 · Category: Network