Inspect and Temporarily Configure Interfaces with ifconfig

Use BSD ifconfig on macOS to view en0 details, bounce an interface, or add a temporary secondary IP alias.

macOSifconfigDiagnosticsMedium risk
Run `ifconfig en0` to inspect, `sudo ifconfig en1 down/up` to bounce, and `sudo ifconfig en0 alias <ip> <mask>` to add a temporary address.

01Command

Command
$ ifconfig en0
sudo ifconfig en1 down && sudo ifconfig en1 up
sudo ifconfig en0 alias 192.168.9.10 255.255.255.0

02What it does

macOS ships the classic BSD ifconfig, which reports interface flags, MAC address, and IPv4/IPv6 addresses in one dump — handy when System Settings is unreachable over SSH. An `alias` adds a second IP without touching your DHCP lease, and `-alias` removes it. Crucially, all ifconfig changes are runtime-only: they disappear on reboot or link renegotiation, so use networksetup for anything permanent.

03Risk

RiskMedium risk
!Warning: Running `down` on the interface you are connected through will sever your own SSH session.

04Undo

Undo
$ sudo ifconfig en0 -alias 192.168.9.10

05Sources

Last verified: 2026-09-17 · Category: Network

06Related solutions