Going to Cisco World

Change your Network Card MAC Address on Ubuntu

Posted by ensit on June 26, 2008


There are a lot of reasons you might want to manually set your MAC address for your network card. I won’t ask you what your reason is.

To change this setting, we’ll need to edit the /etc/network/interfaces file. You can choose to use a different editor if you’d like.

gedit /etc/network/interfaces

You should see the line for your network interface, which is usually eth0. If you have dhcp enabled, it will look like this:

auto eth0
iface eth0 inet dhcp

Just add another line below it to make it look something like this:

auto eth0
iface eth0 inet dhcp
hwaddress ether 01:02:03:04:05:06

Obviously you would want to choose something else for the MAC address, but it needs to be in the same format.

/etc/init.d/networking restart

You will need to restart networking or reboot to take effect.

One Response to “Change your Network Card MAC Address on Ubuntu”

  1. Anonymous said

    HI Ensit

    You have really good post. I like to know if you have any thing to post on Linux clusters

    Thank you for all your collection
    dotsoftbsnl#yahoo.com

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>