Networking CLIs
Interfaces
Use ifconfig to show interfaces:
ifconfig
To reformat the output as json use jc:
ifconfig | jc --ifconfig
networksetup
Better yet use native CLI networksetup.
networksetup -listAllNetworkServices
or
networksetup -listAllHardwarePorts
networksetup -listPreferredWirelessNetworks en0
networksetup -listNetworkServiceOrder
Routes
Show Routes:
netstat -rn