Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
Information about the features you're looking for would be helpful. Don't make us do the research—help us to help you. Nobody should care more about the answer to your question than you do – jaberg Mar 19 '12 at 21:59
Per your suggestion, details provided. – AJ. Mar 19 '12 at 22:02
up vote 11 down vote accepted

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.

share|improve this answer
Thanks, added output above. – AJ. Mar 19 '12 at 22:28
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
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

share|improve this answer
bash-3.2$ networksetup -getinfo Ethernet Ethernet is not a recognized network service. ** Error: The parameters were not valid. – Mona Jalal Mar 21 at 3:49

I would mix both ifconfig and networksetup:


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

status: active

Then networkstatus

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.