I'm a little bit confused about the difference between a network interface
and network service
. For example, the ifconfig
utility documentation talks in terms of the network interface:
ifconfig en0
While "networksetup" is using network service:
networksetup -getinfo %network service name%
Can a single network interface have multiple network services?
Best Answer
networksetup
is the CLI interface for network settings panel in System Preferences. From theman page
:ifconfig
is the utility to set up a network interface. From theman page
What you are seeing is two different methods with different nomenclature for the same thing.
networksetup
is specific to macOS whereifconfig
is more generic and part of the BSD coreAs to your question...
Yes. For instance, you can have an alias for that interface. Using actual System Prefs (because it's visually easier), I created a new service called "Ask Different Demo" to my existing interface "Ethernet"