To change your MAC address in Linux, you just need to issue these few commands, and then re-run dhcp or reconfigure the interface. This works for both wired and wireless cards.
Bring down the interface.
jason@eyjafjallajkull:~$ sudo ifconfig eth0 down [sudo] password for jason: |
Set a new MAC address on the interface.
jason@eyjafjallajkull:~$ sudo ifconfig eth0 hw ether de:ad:be:ef:f0:0d |
Bring the interface back up.
jason@eyjafjallajkull:~$ sudo ifconfig eth0 up |
And the user may then check the new MAC address with the ifconfig eth0
command.
jason@eyjafjallajkull:~$ ifconfig eth0 eth0 Link encap:Ethernet HWaddr de:ad:be:ef:f0:0d UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
This is how easy it is to change your MAC address on Linux.
I was using Ubuntu 15.04 and I got it to work, I will have another look and see if I have any problems with this.
This does not work on Ubuntu 14.04.