What is a MAC Address?

A MAC (Media Access Control) address is a unique 48-bit identifier hardcoded into your network interface controller (NIC) by the manufacturer. It's written as six pairs of hexadecimal digits separated by colons — something like aa:bb:cc:dd:ee:ff.

Every device that connects to a network has a MAC address. Your router uses it to identify devices on the local network, and it can also be used to track your device as you move between WiFi networks — which is one of the main reasons you might want to change it. (On macOS, see how to spoof your MAC address; for broader privacy, learn to remove your personal info from data brokers.)

The first three bytes (24 bits) of a MAC address are called the OUI (Organizationally Unique Identifier), which identifies the manufacturer. For example, Intel, TP-Link, and Alfa each have their own OUI prefixes. The last three bytes are unique to the specific device.

Why Change Your MAC Address?

There are several legitimate reasons to spoof your MAC address:

⚠️ Legal disclaimer: Only change your MAC address on networks you own or have explicit written authorization to test. Unauthorized network access is illegal under the Computer Fraud and Abuse Act (CFAA) in the US and similar laws in other countries.

Prerequisites

Before you start, make sure you have:

Installing Macchanger

Macchanger (GNU MAC Changer) comes pre-installed on Kali Linux. To verify it's available — or install it if it's missing — run:

Terminal
# Update package list and install macchanger $ sudo apt update && sudo apt install macchanger # Verify installation $ macchanger --version GNU MAC Changer 1.7.0

During installation, you'll be asked whether macchanger should automatically change your MAC address every time a network interface is brought up or plugged in.

Macchanger configuration dialog asking whether to automatically change MAC on interface up

Select "No" for manual control over when your MAC changes

💡 Tip: Select No here. Automatic MAC changing can lock you out of networks that use MAC filtering (like your home router). It's better to change your MAC manually when you need to.

After installation, you can verify macchanger is working by running macchanger -h to see the help menu:

Macchanger help menu showing all available options

The macchanger help menu with all available flags

Identifying Your Network Interface

Before changing your MAC address, you need to know the name of your network interface. Use the ip link show command to list all interfaces:

Terminal
$ ip link show 1: lo: <LOOPBACK,UP> mtu 65536 link/loopback 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 link/ether aa:bb:cc:dd:ee:ff 3: wlan0: <BROADCAST,MULTICAST> mtu 1500 link/ether 11:22:33:44:55:66

Common interface names include eth0 for wired Ethernet and wlan0 for WiFi. Your system may use different names — just use whatever appears in your output.

ℹ️ Note: The ifconfig command still works on Kali but is considered deprecated. The modern replacement is ip link, which is part of the iproute2 package and is actively maintained. This guide uses ip commands throughout.

You can also view your current MAC address using macchanger itself:

Terminal
$ macchanger -s wlan0 Current MAC: 11:22:33:44:55:66 (TP-LINK TECHNOLOGIES CO.,LTD) Permanent MAC: 11:22:33:44:55:66 (TP-LINK TECHNOLOGIES CO.,LTD)

Changing Your MAC Address

The process has three steps: bring the interface down, change the MAC, and bring it back up. You must bring the interface down first — otherwise you'll get a "device is busy" error.

Step 1: Bring the interface down

Terminal
$ sudo ip link set wlan0 down

Step 2: Change the MAC address

Macchanger gives you several options depending on what you need. Here's a quick reference:

Flag Command What It Does
-r macchanger -r wlan0 Fully random MAC (no real vendor prefix)
-a macchanger -a wlan0 Random vendor MAC of the same device type
-A macchanger -A wlan0 Random vendor MAC of any device type
-m macchanger -m XX:XX:XX:XX:XX:XX wlan0 Set a specific MAC of your choice
-e macchanger -e wlan0 Randomize but keep the vendor bytes
-p macchanger -p wlan0 Reset to original permanent hardware MAC

The most common option is -r for a fully random MAC:

Terminal — Random MAC
$ sudo macchanger -r wlan0 Current MAC: 11:22:33:44:55:66 (TP-LINK TECHNOLOGIES CO.,LTD) Permanent MAC: 11:22:33:44:55:66 (TP-LINK TECHNOLOGIES CO.,LTD) New MAC: a2:b4:c6:d8:ea:fc (unknown)

If you want to set a specific MAC address (for example, to impersonate a specific device during an authorized test):

Terminal — Specific MAC
$ sudo macchanger -m 00:d0:70:00:20:69 wlan0 Current MAC: 11:22:33:44:55:66 (TP-LINK TECHNOLOGIES CO.,LTD) Permanent MAC: 11:22:33:44:55:66 (TP-LINK TECHNOLOGIES CO.,LTD) New MAC: 00:d0:70:00:20:69 (unknown)
💡 Tip: Use -A instead of -r if you want a random MAC that uses a real vendor OUI prefix. A fully random MAC can sometimes be identified as spoofed because the OUI won't match any known manufacturer. Using -A makes the address look more legitimate.

Step 3: Bring the interface back up

Terminal
$ sudo ip link set wlan0 up # Verify the change $ macchanger -s wlan0 Current MAC: a2:b4:c6:d8:ea:fc (unknown) Permanent MAC: 11:22:33:44:55:66 (TP-LINK TECHNOLOGIES CO.,LTD)

Your MAC address has been changed. The "Permanent MAC" always shows your original hardware address, while "Current MAC" shows the spoofed one.

Viewing Known MAC Vendors

If you want to set a specific MAC address that matches a real manufacturer, macchanger includes a database of known vendor OUI prefixes. You can search it with the -l flag:

Terminal
# List all known vendors $ macchanger -l # Search for a specific vendor $ macchanger -l | grep -i "intel" 0013 - 00:13:e8 - Intel Corporation 0014 - 00:13:02 - Intel Corporation ...

Changing MAC Address Manually (Without Macchanger)

If macchanger isn't available, you can change your MAC address using the ip command directly:

Terminal — Manual Method
# Bring the interface down $ sudo ip link set wlan0 down # Set a new MAC address $ sudo ip link set wlan0 address 00:d0:70:00:20:69 # Bring the interface back up $ sudo ip link set wlan0 up # Verify $ ip link show wlan0
ℹ️ Note: When setting a MAC address manually, use a real vendor OUI prefix for the first three bytes. Fully random addresses don't always work with all drivers and routers. You can look up valid prefixes at macvendors.com.

Making the Change Persist Across Reboots

By default, your MAC address resets to the permanent hardware value after a reboot. To make the change persist, you have a few options:

Option 1: Systemd service (recommended)

Create a systemd service that runs macchanger at boot:

/etc/systemd/system/macchanger@.service
[Unit] Description=Change MAC address for %i Wants=network-pre.target Before=network-pre.target [Service] Type=oneshot ExecStart=/usr/bin/ip link set %i down ExecStart=/usr/bin/macchanger -r %i ExecStart=/usr/bin/ip link set %i up [Install] WantedBy=multi-user.target

Then enable it for your interface:

Terminal
$ sudo systemctl enable macchanger@wlan0.service $ sudo systemctl start macchanger@wlan0.service

Option 2: rc.local (simple but deprecated)

Add the commands to /etc/rc.local before exit 0:

/etc/rc.local
#!/bin/bash ip link set wlan0 down macchanger -r wlan0 ip link set wlan0 up exit 0
Terminal
$ sudo chmod +x /etc/rc.local

Frequently Asked Questions

Can a spoofed MAC address be detected?

Yes, in some cases. A fully random MAC (using -r) may have an OUI that doesn't match any real manufacturer, which could flag it as spoofed. Using -A instead assigns a real vendor prefix, making the address harder to detect. Some advanced network monitoring tools can also detect MAC spoofing by looking for duplicate MAC addresses on the network.

Does changing my MAC address also change my IP address?

Not directly. However, if your network uses DHCP (most do), bringing the interface down and back up will typically trigger a new DHCP lease request, which may result in a different IP address being assigned.

Does this work with USB WiFi adapters?

Yes. Replace wlan0 with whatever interface name your USB adapter uses. You can find it with ip link show. Some adapters may use names like wlan1 or something vendor-specific. For recommended USB adapters, see our guide on the best WiFi adapters for Kali Linux.

Why do I get "device busy" or "insufficient permissions" errors?

Two common causes: either you forgot to bring the interface down first (run sudo ip link set wlan0 down before macchanger), or you're not running the command as root. Always use sudo.

Will my MAC address stay changed after a reboot?

No — unless you set up a systemd service or rc.local script (see the "Making the Change Persist" section above). By default, macchanger only changes the MAC for the current session.

What's the difference between macchanger -a, -A, and -r?

-r sets a fully random MAC with no real vendor. -A sets a random MAC using a real vendor prefix of any type. -a sets a random MAC using a real vendor prefix of the same device type as your current adapter. Use -A for the best balance of randomness and realism.