How to change or spoof MAC address in Ubuntu?

The most common reason to change or spoof MAC addresses is to maintain privacy. When you connect to a public network, the MAC address gets exposed to that network. Spoofing or changing your MAC address keeps your ID unexposed and thus maintaining the privacy of the user.

In this article, we will demonstrate to you how to change or spoof your MAC address in Ubuntu using GUI or with the help of the Terminal.

How to change or spoof MAC address in Ubuntu using GUI?

Follow the steps below to change or spoof your MAC address.

Step 1: Go to Settings

Click on Activities to launch Activities overview and type Settings to search for it.

Activities In Ubuntu 1
Click on Activities and search for Settings.

Click on its icon to open Settings.

Open Settings
Open Settings.

Step 2: Open Network Panel

Click Network in the sidebar to open Ubuntu’s Network Panel.

Open Network Panel
Open Network Panel.

Step 3: Edit Connection

Now edit the selected connection to change or spoof the MAC address.

Click To Open Settings To Edit Connection
Click to Open Settings to Edit Connection.

Step 4: Go to the Identity Tab

Now we need to go to the Identity tab.

Go To The Identity Tab By Clicking It 1
Go to the Identity tab by clicking it.

Step 5: Select Device’s MAC address

From the dropdown menu, select your device’s MAC address.

Select Devices MAC Address
Select Device’s MAC address.

Step 6: Enter Cloned Address

Enter the MAC address in the Cloned Address that you want to use as your hardware address.

Enter A MAC Address You Want To Use
Enter MAC address to Spoof

After entering the Cloned Address click, Apply on the top left.

After Entering Click Apply
After entering the Cloned Address click, Apply.

Then restart the Network Connection.

Step 6: Verify spoofed MAC address (Optional)

You can see/verify the spoofed MAC address by executing the following command in the Terminal:

ip link ls

Output:

Verifying Spoofed MAC Address
Verifying Spoofed MAC Address

How to change or spoof MAC address in Ubuntu using the Terminal?

To find out the network interfaces with their MAC addresses, enter the command:

ip link ls

Output:

Network Interfaces
List Network Interfaces

Turn off the network card you want to spoof MAC address for by executing:

sudo ip link set dev enp0s3 down

Now, set a spoofed MAC address by executing:

sudo ip link set dev enp0s3 address XX:XX:XX:XX:XX:XX

Next, turn on the network card by executing:

sudo ip link set dev enp0s3 up

Now, enter the following command to verify the Spoofed MAC address.

ip link ls
Verifying Spoofed MAC Address 1
Verifying Spoofed MAC Address

We’ve successfully spoofed our MAC address maintaining privacy!

Conclusion

Spoofing or changing MAC addresses maintains our privacy. It is recommended to use a spoofed MAC address when connecting to a public network or a VPN.

In the above tutorial, we have demonstrated spoofing MAC addresses on Ubuntu using GUI and with the help of the Terminal.

Thank you for reading! 😀