List of all interfaces in my laptop
Below is the machine:
$ uname -a
Darwin whatever 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec 1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64 x86_64
$
In ubuntu, ip addr
or ip a
gives list of all interfaces.
What is the similar command in mac?
networksetup -listallnetworkservices
is the macOS command that I believe you are looking for.
Quoting from man networksetup
:
-listallnetworkservices
Displays a list of all the network services on the server's hardware ports. An asterisk (*) denotes that a network service is disabled.
On my MacBook Air:
An asterisk (*) denotes that a network service is disabled.
Wi-Fi
iPhone USB
Bluetooth PAN
Thunderbolt Bridge
There's also ifconfig
which will show you IP addresses and MAC addresses, if that is what you are looking for.