Posted: . At: 9:55 PM. This was 9 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.

Change your MAC address on Linux with the command line.

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.

2 thoughts on “Change your MAC address on Linux with the command line.”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.