A Media Access Control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment. Read more about MAC addresses here.

Tip: Please write down your current MAC address before you continue

To change the MAC address in Ubuntu, perform the following:

Temporary solution

  1. Open terminal and check your current MAC address:
    ifconfig |grep HWaddr  

    Output should be something like this (MAC’s are red):
    eth0           Link encap:Ethernet  HWaddr f4:6d:0b:37:f9:83
    vboxnet0  Link encap:Ethernet  HWaddr 0b:00:23:00:00:00
    wlan0       Link encap:Ethernet  HWaddr e0:c9:d5:1a:ed:b5

  2. Now, disable the network interface (eth0 for the wired network connection, wlan0 for wireless etc.):
    sudo ifconfig eth0 down
     

     

  3. Change the MAC address:
    sudo ifconfig eth0 hw ether 00:15:a5:d5:39:19
     

  4. Enable the network interface:
    sudo ifconfig eth0 up
     

  5. Check if the change is successful:
    ifconfig |grep HWaddr  

    Should return the changed address:
    eth0           Link encap:Ethernet  HWaddr 00:15:a5:d5:39:19
    vboxnet0  Link encap:Ethernet  HWaddr 0b:00:23:00:00:00
    wlan0       Link encap:Ethernet  HWaddr e0:c9:d5:1a:ed:b5

Permanent solution

  1. Open the interfaces file, you can choose any text editor you want:
    sudo vi /etc/network/interfaces  

    You should see something like the following:
    auto lo
    iface lo inet loopback

  2. Add this line at the bottom of the file:
    hwaddress ether 00:15:a5:d5:39:19 

    The red text is the MAC address, so replace this one with your desired address.

  3. Restart the networking service or your computer:
    sudo /etc/init.d/networking restart

Common issue(es)

  1. If there is no connectivity after ifconfig eth0 up or sudo /etc/init.d/networking restart try the following:
    dhclient eth0 

    This will request a new IP address and it should fix the connectivity issue.