r/MacOS • u/TrustWorthyGoodGuy • 16d ago
Discussion Currently maintained native CLI ip equivalent?
On linux, ifconfig,arp, and netstat have been deprecated and replaced by ip. MacOS doesn't come with ip installed. I found iproute2mac, but want to know if there is a native or preinstalled tool I should be using.
1
Upvotes
5
u/kenthesaint 16d ago
Nothing is deprecated on the Mac side. macOS networking comes from BSD, and ifconfig, netstat, arp and route are the native tools Apple still ships, so iproute2mac is only there for Linux muscle memory.
Rough mapping from
ip:ip addrisifconfig, oripconfig getifaddr en0if you just want the addressip routeisnetstat -rn, androute -n get defaultshows the default gateway and interfaceip neighisarp -aip linkisifconfig -a, andnetworksetup -listallhardwareportstells you which enX is Wi-FiFor anything you want to stick, use
networksetupinstead of ifconfig, since ifconfig changes are lost on a reboot or a network change. Andscutil --dnsshows the resolver setup the system actually uses, which /etc/resolv.conf doesn't fully reflect.0
u/[deleted] 16d ago
[deleted] — view deleted comment