How to Change the MAC Address of Linux

Published on August 31, 2020 46 sec read

Today I’m going to show how to change the Media Access Control (MAC) address of your Linux system. I’m testing on Kali linux.

Table of Contents

  1. What is MAC address
  2. Why Change the MAC Address?
  3. Change MAC address

What is MAC address

According to Wikipedia, the MAC address is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use is common in most IEEE 802 networking technologies, including Ethernet, Wi-Fi, and Bluetooth.

Why Change the MAC Address?

Normally we don’t need to change the MAC address of our system. But if any wireless system has blocked your main MAC, you may need to change the MAC to access the network.

Change MAC address

We can easily spoof MAC address in Kali. Run this command to see your MAC addess:

sudo ifconfig

Output:

Look at eth0 Ethernet interface. 00:15:5d:e1:70:a7 is the MAC address of my system.

To change the MAC to random address run these commands:

sudo ifconfig eth0 down
sudo macchanger -r eth0
sudo ifconfig eth0 up

Set a Specific MAC address:

sudo ifconfig eth0 down
sudo macchanger -m 00:15:70:00:20:75 eth0
sudo ifconfig eth0 up

Done! Now you can run sudo ifconfig to see the new MAC.

That’s it. Thanks for reading. 🙂

Author

Hey, I'm Md Obydullah. I build open-source projects and write on Laravel, Linux server, modern JavaScript and more on web development.

Follow

Leave a Reply

Your email address will not be published. Required fields are marked *