Solaris/SunOS

On Solaris and SunOS systems, the ethernet device is typically called le0 or ie0. In order to find the MAC address of the ethernet device, you must first become root, through the use of su. Then, type ifconfig -a and look up the relevant info. For example:

# ifconfig -a
le0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
        inet 131.225.80.209 netmask fffff800 broadcast 131.225.87.255
        ether 8:0:20:10:d2:ae

Note: Solaris and SunOS strip off the leading 0 commonly included in the MAC address. In the case of this machine, the MAC address is 08:00:20:10:d2:ae

Linux

On Linux systems, the ethernet device is typically called eth0. In order to find the MAC address of the ethernet device, you must first become root, through the use of su. Then, type ifconfig -a and look up the relevant info. For example:

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:60:08:C4:99:AA
          inet addr:131.225.84.67  Bcast:131.225.87.255  Mask:255.255.248.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15647904 errors:0 dropped:0 overruns:0
          TX packets:69559 errors:0 dropped:0 overruns:0
          Interrupt:10 Base address:0x300

The MAC address is the HWaddr listed on the first line. In the case of this machine, it is 00:60:08:C4:99:AA.

FreeBSD

On a FreeBSD machine the command dmesg will display the MAC address, among other things.

HP

On HP systems, the ethernet device is typically called lan0. Type lanscan and look up the relevant info. For example:

$ lanscan
Hardware Station        Dev Hardware Net-Interface   NM  Encapsulation      Mjr
Path     Address        lu  State    NameUnit State  ID  Methods            Num
2.0.2    0x08000935C99D 0   UP       lan0     UP     4   ETHER              52

Note: HP systems remove the :’s from the MAC address. In the case of this system, the MAC address is 08:00:09:35:C9:9D.

Copy Write From : http://www-dcn.fnal.gov/DCG-Docs/mac/index.html


0 Responses to “How to find your MAC address (UNIX)”

  1. No Comments

Leave a Reply





Subscribe

Subscribe to my RSS Feeds