• Home
  • Comp Hardware
    • Consoles
    • Desktops
  • Everything
    • Entertainment
      • Music
      • Sci-Fi
    • Software
      • Open Source
      • Video Games
    • Science
    • Technology
    • Video Games
      • Console Games
      • PC Games
  • Laptops
  • Mobile
  • Tablets
  • Tools
    • Binary, Hex to Text Tool, Encode – Decode
  • Tutorials
    • DIY
  • About

How To Check MAC Address of A Network Interface Card in Linux


Posted by Sumodirjo on 13 Jul 2012 / 0 Comment
Tweet



MAC Address short of Media Access Control Address is a hardware address that unique for each Network Interface Card, Actually not only NIC, some Switch and routers also have it’s...

MAC Address short of Media Access Control Address is a hardware address that unique for each Network Interface Card, Actually not only NIC, some Switch and routers also have it’s own MAC Address. MAC Address is network address implemented at data-link layer (in OSI Model). MAC Address also known as Ethernet Address, Physical Address or Hardware Address. So, How could we know MAC address of a Network Interface Card (NIC) in Linux? We can simply use ifconfig, yup you’re right it’s the same ifconfig that we use to configure IP Address for a NIC.

For example, if you want to see device information for eth0, you will use command ifconfig eth0

[sumodirjo@kiara ~]$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:26:18:00:00:00
          inet addr:192.168.19.1  Bcast:192.168.19.255  Mask:255.255.255.0
          inet6 addr: fe80::226:18ff:fe41:1c14/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:132359545 errors:0 dropped:0 overruns:0 frame:0
          TX packets:116155333 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:995370139 (949.2 MiB)  TX bytes:909399988 (867.2 MiB)
          Interrupt:233

On the output above the entr that hold MAC Address is HWaddr on the first line. If there are many ethernet card and you want to show only MAC address for each card, you can use ifconfig with grep, for example

[sumodirjo@kiara ~]$ ifconfig | grep HWaddr
eth0      Link encap:Ethernet  HWaddr 00:26:18:00:00:00
eth0:1    Link encap:Ethernet  HWaddr 00:26:18:00:00:00
eth2      Link encap:Ethernet  HWaddr 00:10:4B:00:00:00

Alternatively, as root user, you can see MAC address of a network card using dmesg


[root@kiara ~]# dmesg | grep eth
eth0: RTL8168c/8111c at 0xf8920000, 00:26:18:00:00:00, XID 3c4000c0 IRQ 233
eth2: Macronix 98715 PMAC rev 37 at f895a800, 00:10:B5:00:00:00, IRQ 169.

Additional Info, if you are using FreeBSD, you can search for ether column which contain MAC Address info.

Share this:

  • More

Check Out These Posts:

  • How To List All Currently Open Files in Linux
  • How To Check Detailed Hard Drive Information in Linux
  • How-to Use Alias in Linux
  • How To Check What Kernels Installed on A Linux System

Written by Sumodirjo

Full time husband of @ririsretno, part time System Engineer and Technologist. Hold Red Hat Certified Engineer certification #805009123038313 since March 2009. In his spare time he maintain kurungsiku, a media network in Indonesian Language, and just started a new blog HowToDojo

Related Posts



How To Create A Swap File in CentOS
July 16, 2012

How To List All Currently Open Files in Linux
July 16, 2012

How To Check Detailed Hard Drive Information in Linux
July 15, 2012

354

fans

1,354

followers

  • Categories

  • Say what YOU think!

    I will be upgrading from Windows 7 to Windows 8

      No Expiry

    View Results

    Loading ... Loading ...


  • Want to talk to us?

    • Write For Us!
    • Contact
    • Advertise
  • Account Tools

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

Electronics Fan Boy, is a participant in the
Amazon Services LLC Associates Program, Commission Junction, Link Share, zferral, share-a-sale, shopzilla;
affiliate advertising programs designed to provide a means for sites to earn
advertising fees by advertising and linking to many different advertisers to earn sales commissions.
Protected by Copyscape Online Copyright Checker
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.