Linux or UNIX: How to find out or display the Ethernet Address (MAC)
Media Access Control (MAC) address is a unique identifier attached to most networking devices (such as router, Ethernet cards etc).
This address is some time required. For example, there is famous engineering expensive software. This software needs your unique MAC address to issue you license and necessary software installation keys. Some time MAC address used for filtering purpose (firewall or sniffers) or diagnosing network problems .
Task: Find out my Mac address
Use arp command.
$ arpOutput:
Address HWtype HWaddress Flags Mask Iface vpn.dhcp.cyberciti.org ether 00:76:C7:76:F0:01 C eth0 desktop.cyberciti.org ether 00:08:5C:00:00:01 C ra0
$ arp -nOutput:
Address HWtype HWaddress Flags Mask Iface 10.5.123.1 ether 00:76:C7:76:F0:01 C eth0 192.168.1.5 ether 00:08:5C:00:00:01 C ra0
arp manipulates the kernel's ARP cache in various ways. The primary options are clearing an address mapping entry and manually setting up one. arp command works under
- Linux
- *BSD
- UNIX
- MS Windows
Where,
- -n : Shows numerical addresses instead of trying to determine symbolic host, port or user names.
Task: Changing MAC addresses
Please note that physical MAC addresses are permanent, but several mechanisms allow modification (read as spoofing) of the MAC address that is reported by the operating system.
Under Linux you can type the command to setup a new MAC address :
# ifconfig eth0 down
# ifconfig eth0 hw ether 01:02:03:04:05:06
Where,
- 01:02:03:04:05:06 - Mac address
If you are using FreeBSD type the command:
# ifconfig nc0 ether 01:02:03:04:05:06
If you are using OpenBSD or Mac OS X type the command:
# ifconfig nc0 lladdr 01:02:03:04:05:06
If you are using Windows 2003/XP:
Under Windows XP or 2003 server the MAC address can be changed in the Ethernet adapter's Properties menu > Advanced tab > Look for MAC Address > Locally Administered Address > Ethernet Address > Physical Address option.
Also, note that some ISP's use MAC addresses to control the access (this is rare case these days). Therefore, if you change MAC address you may lose the connectivity.
E-mail this to a friend
Printable version
You may also be interested in other helpful articles:
- Iptables mac address filtering
- Most Emailed Linux FAQ in 2007
- Linux tip: Save Power With Gigabit Ethernet By Using Lower Speed
- Finding out who is logged on to a Solaris system
- FreeBSD > How to change IP address or setup new ip address to existing interface
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!


Recent Comments
Yesterday ~ 7 Comments
Yesterday ~ 2 Comments
Yesterday ~ 5 Comments
Yesterday ~ 13 Comments
Yesterday ~ 27 Comments