mac command line get new ip address code example Example: dhcp release mac os sudo ipconfig set en0 DHCP