DHCP
ipconfig getifaddr en0
Show the IP address of a macOS interface.
Explanation
On macOS, ipconfig getifaddr returns the IP address assigned to a specific interface. En0 is commonly Wi-Fi, but interface names can vary.
Syntax
ipconfig getifaddr en0
Show Wi-Fi IP address
ipconfig getifaddr en0
If nothing returns, confirm the correct interface name.