Change your MAC address in Linux

By | September 26, 2009

If you wish to change your MAC address in Linux, all you have to do is bring the interface down then use the hw ether switch:

ifconfig eth0 down
ifconfig eth0 hw ether 02:01:02:03:04:08
ifconfig eth0 up

2 thoughts on “Change your MAC address in Linux

  1. Pingback: «? ? Ubuntu» » ??? ???????? MAC-????? ? Linux

  2. stardust

    nice 😉 but if you want your pc to change its MAC address on boot add that to a script in /etc/init.d/ folder, and also add symbolic link(ln) to /etc/rc2.d, /etc/rc3.d, /etc/rc4.d, /etc/rc5.d which refers to the script in /init.d/

    script:

    #!/bin/bash

    ifconfig eth0 down
    ifconfig eth0 hw ether 02:01:02:03:04:08
    ifconfig eth0 up
    /etc/init.d/networking restart

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *