Change your MAC address on Linux with the command line.

Posted: May 12, 2015. At: 9:55 PM. This was 3 years ago. Post ID: 8189
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

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.

[email protected]:~$ sudo ifconfig eth0 down
[sudo] password for jason:

Set a new MAC address on the interface.

[email protected]:~$ sudo ifconfig eth0 hw ether de:ad:be:ef:f0:0d

Bring the interface back up.

[email protected]:~$ sudo ifconfig eth0 up

And the user may then check the new MAC address with the ifconfig eth0 command.

[email protected]:~$ 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.

2 responses to “Change your MAC address on Linux with the command line.

Leave a Reply