Dec 12, 2007

Discovering your MAC address in Linux

You can generally find your MAC address with ifconfig-

# /sbin/ifconfig eth0
There should be an entry "HWaddr" on the first line that tells the hardware address for your network card.

Changing the MAC address
In Linux the MAC address can be changed with most network card drivers. This can be useful in cases where there is security based on MAC addresses and you get a new network card. Example to change it:

# ifconfig eth0 hw ether 00:00:00:00:00:00
This just changes it in the software drivers, not the actual MAC address on the hardware (so it has to be done after every boot). Some on-board network cards allow the address to be changed in the BIOS.

No comments: