Change MAC address in Linux



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
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/
#!/bin/bash

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


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Popular Posts