Hardware, Technology

How-to: Discover MAC Address on Linux


Find MAC Address on LinuxIf you travel around a lot, as I do, then you’ll often find the more secure locations with computer networks want to know the MAC address of any mobile devices you want to attach to their networks.

The MAC address is one way for wireless networks to restrict access to only those devices they can identify. You’ll need to give your MAC Address to the network manager to add your device to the list of registered devices so that you can use the network.

The method for Linux Mint follows. AJS

MAC Address numbers should be unique thanks to it’s length in hexadecimal notation and the MAC Address is difficult to fake. The MAC Address is 12 digits long, broken up into pairs: 12:34:56:78:9A:BC. It’s a base-16 value (hence called hexadecimal), so the letters A through F are treated as numeric values.

If you have an active connection, you can click on the Network Manager icon in the notifications (panel) area of your desktop – see image top right, click to enlarge. From the menu, select connection information to open the information pane, similar to that shown. You MAC Address is the hardware address at the top – but only for the active connection, be it wired or wireless.

To get the MAC address across all your network cards, the better solution is a terminal command:
ifconfig

This will show you a list of the network adapters installed. The MAC address is referred to here as the HWaddr (HardWare Address):

eth0 Link encap:Ethernet HWaddr 00:19:b9:5f:01:36
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:17

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1040 errors:0 dropped:0 overruns:0 frame:0
TX packets:1040 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:81536 (81.5 KB) TX bytes:81536 (81.5 KB)

wlan0 Link encap:Ethernet HWaddr 00:1b:77:00:54:19
inet6 addr: fe80::21b:77ff:fe00:5419/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:1765 errors:0 dropped:0 overruns:0 frame:0
TX packets:1364 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:757657 (757.6 KB) TX bytes:251021 (251.0 KB)

Most Linux distributions call the first Ethernet network adapter eth0, and subsequent adapters eth1, eth2, etc. You will find the hardware address listed after HWaddr. The loopback adapter, lo, can be ignored because it is not a physical network device. If you have a wireless card you will see more than one MAC Address, beginning wlan0 for the first card. Make sure you register the right MAC address for the type of network connection wherever it is you’re going.

To pick out your wireless MAC address type:
iwconfig

This will exclude all the other types:

wlan0 IEEE 802.11abg ESSID:"TEMPEST"
Mode:Managed Frequency:2.437 GHz Access Point: 00:0F:B5:7D:77:40
Bit Rate=54 Mb/s Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=41/70 Signal level=-69 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:1 Invalid misc:74 Missed beacon:0

About Allan J. Smithie

Allan J. Smithie is a journalist and commentator based in Dubai.

Discussion

2 thoughts on “How-to: Discover MAC Address on Linux

  1. Reblogged this on anthonyvenable110 and commented:
    very well written this will prove to be useful

    Posted by anthonyvenable110 | March 5, 2012, 4:31 am
  2. this is awesome

    Posted by anthonyvenable110 | March 5, 2012, 4:32 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Twitter Updates

Follow us on Twitter @EverythingExpre

Find Us on Facebook

Enter your email address to follow this blog and receive notifications of new posts by email.

Categories

Library

BBC World News

BBC World News
Opens the BBC World News page.
%d bloggers like this: