How to change your MAC Address on linux using ifconfig

There might be a time when you need (or just want) to change your MAC address, it may be to connect privately to a public hotspot or just for fun. No matter what obscure reason you have you can easily change it using the console command ifconfig. Open up a terminal and as root (or using sudo) type the following commands, just replace eth0 with the interface you are modifying:

/etc/init.d/networking stop
ifconfig eth0 hw ether 00:01:02:03:04:05
/etc/init.d/networking start

where 00:01:02:03:04:05 is your desired MAC address, change that number for whatever address you want, just remember that every pair of numbers is a hexadecimal number that ranges from 00 to FF.

Now to see if the change took effect type the following command:

ifconfig eth0 | grep HWaddress

If everything went right you should see the new MAC address. Now you can change your address whenever you want to, just keep in mind this is just a temporary change and your address will reset on the next boot.

0 comments

Please insert the result of the arithmetical operation from the following image
Enter the result of the arithmetical operation from this image