Server Fault is a question and answer site for system and network administrators. 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

Is there any way I can obtain the MAC Address/interface name from GUI on FreeBSD? Are there any system calls to do that? I was searching everywhere but couldn't find any information. Can you please help?

Thanks a lot in advance.

Best Regards, Marc.

share|improve this question

I realize you're looking for a GUI way to do this but you can get the MAC Address from the command line like so:

$ ifconfig em0
        inet6 fe80::20c:29ff:fefd:f61d%em0 prefixlen 64 scopeid 0x1
        inet netmask 0xffff0000 broadcast
        ether 00:0c:29:fd:f6:1d
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active

The MAC Address is the string after the word "ether", 00:0c:29:fd:f6:1d. You can see all the network devices with this command:

$ ifconfig -a

see the ifconfig man page for more info.


ifconfig em0 | awk '/ether/ {print $2}'
share|improve this answer
Thanks a lot.. This was helpful. I was more looking for a programmatic way to get the details. – Marc Spencer Apr 24 '13 at 8:43
See the example I added to my answer. You can adjust it to suite your needs. – slm Apr 24 '13 at 8:47
Useless use of grep: ifconfig em0 | awk '/ether/ {print $2}' – ptman Apr 24 '13 at 9:58

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.