How To Change MAC Address On Kali Linux

How To Change MAC Address On Kali Linux


After our previous tips and trick about how to change MAC address on Windows, now we will learn about the same topic How to Change MAC Address on Kali Linux.

Changing MAC address or we also can call it MAC address spoofing will be useful in some cases, but we will talk about it later in conclusion at the end of this article.


1. Linux terminal

Step by step How to Change MAC Address on Kali Linux:

1. Open your terminal, and type

ifconfig | grep HWaddr

How To Change MAC Address On Kali Linux

you will see your original MAC address, mine was 08:00:27:b2:4d:4b

2. To temporary change our MAC address, we need to turn off the network interface first by running this command

ifconfig eth0 down

3. After that we can configure the new MAC address

ifconfig eth0 hw ether 00:00:00:00:00:02

you can change the MAC address using this hexadecimal format XX:XX:XX:XX:XX:XX

4. Now we can turn on the network interface again.

ifconfig eth0 up

5. And the last we can check again our MAC whether it's change or not.

How To Change MAC Address On Kali Linux

if we follow until this step, MAC address will back to default after we restart our machine. Go to next page to view how to change MAC address permanently.

6. Kali Linux was built based on Debian. In Debian all the network interface was located on /etc/network/interfaces.

7. We will configure the /etc/network/interfaces. In this tutorial I will use pico text editor, but you can choose any of your favourite text editor.

pico /etc/network/interfaces

8. Now we will add one line of script to change our MAC address permanently

pre-up ifconfig eth0 hw ether 00:00:00:00:00:02

This script will be called on system startup.

How to change MAC address on kali linux

9. If we want to restore the default MAC address, just add the # sign in front of script in step 8.

#pre-up ifconfig eth0 hw ether 00:00:00:00:00:02


1. Changing MAC address usually needed for privacy and prevent tracking in the local network about our hardware information(e.g: in public wi-fi network).

2. Some network administrator they make blocking rule in proxy or router by adding the MAC address. To ensure interoperability and preventing being blocked by the proxy or router blacklist rule, we can change our MAC address.

Hope you found it useful

(Visited 62,550 times, 18 visits today)

Share this article if you found this post was useful:

Blogger at Love PHP, offensive security and web.
Contact him at me[-at-]

See all posts by || Visit Website :

  • Revolver

    I can’t type the | sign in terminal.When i try it doesn’t work.pls help me

    • v4L

      The | sign should be there…press (SHIFT) + ()backslash

      • Rao Shahzeb Haider

        genious u are…i wish you would b a muslim

        • Mateo Jose

          To anyone interested in learning more about Islam: Do a Google image search for “Prophet Muhammad and Aisha”.

  • ifconfig wlan0 down

    macchanger -a wlan0

    ifconfig wlan0 up

    Enjoy 😉 This is another system for changing mac

  • drogs

    i’cant change my MAC adr.

    i tryed all mode..

    ifconfig eth0 down
    macchanger -a eth0
    ifconfig wlan0 eth0

    and not starting up.. this apper on in ifconfig
    but i can’t connecting to internet..
    (i have router)
    you can help me?

  • hunter eyes

    i want change ip addres only how i can do it by terminal

  • Flarb Blarbson

    If your Kali instance is a VirtualBox VM, changing the MAC address this way will break networking (at least while you are NAT’d within VirtualBox). You will need to change the MAC address via the VirtualBox network settings.

  • bob2486

    helpful and easy to understand article

  • FirstYolah

    What about spoofing the MAC address? Not changing it to something so obvious, but something more believable.

  • Jake Long

    Ehi man I have a little problem. I followed your instructions but when I re-connect in my default network (after setting a random MAC) the MAC address return to the original one. Can you help me?