Other than ifconfig, is there an app/script for OS X Lion that produces similar output/info to ethtool?

Specifically, I would like to be able to query the following:

  • driver info
  • online/offline
  • speed
  • duplex

Output from ethtool looks like this:

ajc@ajc-3] sudo ethtool eth0|grep Duplex                                                                                                                                                    ~
    Duplex: Full
ajc@ajc-3] sudo ethtool eth0|grep Speed                                                                                                                                                     ~
    Speed: 100Mb/s
ajc@ajc-3] sudo ethtool eth0|grep Link                                                                                                                                                      ~
    Link detected: yes
ajc@ajc-3] sudo ethtool -i eth0                                                                                                                                                             ~
driver: pcnet32
version: 1.32
bus-info: 0000:00:03.0

My primary tools for reading OSX details on hardware are system_profiler and ioreg. For network interface details, ifconfig is the best bet. The first two will show you connection paths for the hardware as well as software driver information. In your example - media and status provide most of the details you listed.

mac:~ me$ ifconfig en0 

    ether 00:1b:63:a8:33:33 
    inet6 fe80::21b:63ff:fea8:3333%en0 prefixlen 64 scopeid 0x4 
    inet netmask 0xffffff00 broadcast
    media: autoselect (100baseTX <full-duplex,flow-control>)
    status: active

mac:~ me$ system_profiler|awk '/^Ethernet Cards/{c=15;next}c-->0'


          Type: Ethernet Controller
          Bus: PCI
          Vendor ID: 0x10de
          Device ID: 0x0ab0
          Subsystem Vendor ID: 0x10de
          Subsystem ID: 0xcb79
          Revision ID: 0x00b1
          BSD name: en0
          Kext name: nvenet.kext
          Location: /System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/nvenet.kext
          Version: 2.0.17

In your case, you are grepping for Duplex, Speed and Link and on Mac hardware you can get all of that data from ifconfig en0 | egrep [media|status] as desired.

  • I checked both of these commands, and they seem to probe extensive, system-wide info. I'd rather avoid that if possible...I wonder if there's something networking-focused? – AJ. Mar 19 '12 at 22:40
  • 2
    I disagree with this comment, you can easily replicate the suggested output of ethtool simply by adding a grep statement in the same way you did. ifconfig en0 | grep Media: supplies the same details as the first 3 of your ethtool outputs in a single command and without any extraneous information. – stuffe Mar 24 '12 at 13:07
  • The only difference remaining is that macs list autoselect and the negotiated link speed and don't simply report just the link speed. Piping output to awk and cut can help there is desired. – bmike Mar 24 '12 at 15:13
  • @stuffe - the "two commands" to which my comment refers were system_profiler and ioreg. i agree that ifconfig is less resource-intensive. – AJ. Mar 27 '12 at 20:12

Maybe networksetup can give you some information you're looking for:

networksetup -getinfo Ethernet
networksetup -getmedia Ethernet


NAME networksetup -- configuration tool for network settings in System Preferences.

But it's not really lean and may give you less information than ifconfig

  • 1
    bash-3.2$ networksetup -getinfo Ethernet Ethernet is not a recognized network service. ** Error: The parameters were not valid. – Mona Jalal Mar 21 '16 at 3:49

I would mix both ifconfig and networksetup:


alex@smiley:~|⇒  ifconfig en0 | grep status
status: active


alex@smiley:~|⇒  networksetup -getinfo "Ethernet Adaptor (en0)" 
DHCP Configuration
IP address:
Subnet mask:
Client ID:  
IPv6: Automatic IPv6 
IP address: none
IPv6 Router: none 
Ethernet Address: 1c:6f:65:98:de:81

Grep out whichever lines from both tools that you want. Would be easy enough to combine the various lines into a simple script to output all the information together.


Please change en0 to your i/f name

$ networksetup -getmedia en0
Current: autoselect
Active: 1000baseT <full-duplex>

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • Welcome to Ask Different. Please see How to Answer for tips on providing answers here. This info is very similar to a previous answer. Please either edit the existing answer to add your info or explain why your answer is substantially different or better than the one already provided. - From Review – fsb Apr 30 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .