• How to change MAC address for Ubuntu

    To change the MAC address permanently in Ubuntu :

    # vi /etc/network/interfaces

    Add the following lines :

    auto eth0
    iface eth0 inet dhcp
    hwaddress ether 00:21:00:59:1f:86

    Restart network service :

    # /etc/init.d/networking restart

    To change the MAC address Temporary in Ubuntu :

    # sudo ifconfig eth0 down
    # sudo ifconfig eth0 hw ether 00:21:00:59:1f:86
    # sudo ifconfig eth0 up

    Or you can add the previous lines into /etc/rc.local configuration file :

    # vi /etc/rc.local
    ifconfig eth0 down
    ifconfig eth0 hw ether 00:21:00:59:1f:86
    ifconfig eth0 up

    Don’t forget to modify the configuration according to the interface (eth0,eth1,…)and the mac address you want to set.

     

    Categories: Linux

    Comments are currently closed.