Show a Network Service's IP and Router with networksetup

networksetup -getinfo summarizes a named network service: IP, subnet mask, router, and configured DNS.

macOSnetworknetworksetupWi-FiLow risk
Run `networksetup -getinfo "Wi-Fi"` to see the current DHCP-assigned address, mask, router and DNS in one shot.

01Command

Command
$ networksetup -getinfo "Wi-Fi"

02What it does

System Settings scatters this information across Wi-Fi details and TCP/IP tabs; -getinfo prints it in one block. The argument is the network service name, not the interface — quote it if it contains spaces. The output also shows whether the service is configured via DHCP or a manual address, which is the first thing to check when a Mac gets a 169.254.x.x address and cannot reach anything.

03Risk

RiskLow risk
RequirementsReplace "Wi-Fi" with your service name — list them with `networksetup -listallnetworkservices`.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions