Your cart is currently empty!
How to Permanently Change Your MAC Address on Linux
Changing your MAC address can help with privacy, security, or even bypassing network restrictions. On Linux, temporarily changing your MAC address is easy—but making the change permanent takes a few extra steps. Here’s how to do it right.
What is a MAC Address?
A MAC address (Media Access Control address) is a unique identifier for your network interface card (NIC). Routers and other network devices use it to identify your computer on a local network.
Why Change Your MAC Address?
- Privacy: Avoid tracking by networks that log MAC addresses.
- Network Restrictions: Bypass limits tied to your hardware.
- Testing: Simulate other devices on your network.
Warning
Changing your MAC address can cause issues with network access if your network restricts connections by MAC. Proceed with caution.
Step-by-Step: Permanently Change Your MAC Address
There are different ways to change your MAC address, depending on your Linux distribution and network manager. Here’s how to do it on both major setups: NetworkManager (used by Ubuntu, Fedora, etc.) and systemd-networkd.
1. Identify Your Network Interface
Open a terminal and run:
ip link
Look for the interface you want to change—usually eth0
, enp3s0
, wlan0
, or something similar.
2. Choose Your Method
A. NetworkManager (Most Desktops: Ubuntu, Fedora, etc.)
- Edit the Connection Profile
sudo nm-connection-editor
Select your connection, click “Edit.” - Set the Cloned MAC Address Go to the “Ethernet” or “Wi-Fi” tab, find “Cloned MAC address,” and enter your new MAC address.
Example:00:11:22:33:44:55
- Save and Reconnect Click “Save,” then disconnect and reconnect to apply the new MAC address.
Alternatively, you can edit the profile directly:sudo nano /etc/NetworkManager/system-connections/<Your-Connection-Name>
Add or edit this line under[ethernet]
or[wifi]
:cloned-mac-address=00:11:22:33:44:55
Save the file, reload NetworkManager:sudo systemctl restart NetworkManager
B. systemd-networkd (Advanced/Servers)
- Edit or Create a .network File Open the relevant network file:
sudo nano /etc/systemd/network/10-ethernet.network
Add or edit:[Match]
Name=eth0
[Link]
MACAddress=00:11:22:33:44:55
- Restart systemd-networkd
sudo systemctl restart systemd-networkd
3. Verify the Change
After rebooting or reconnecting, check your MAC address:
ip link show <interface>
You should see your new MAC address listed.
Common Issues
- Wrong Interface Name: Double-check which interface you’re changing.
- NetworkManager Overwrites Changes: If you edit files directly, NetworkManager may overwrite your settings. Use its GUI or config files.
- MAC Filtering: Some networks will block unknown MAC addresses. Know your environment.
Final Thoughts
Changing your MAC address on Linux permanently takes just a few steps. Pick the method that matches your setup and always keep a note of your original MAC address in case you need to revert.
Questions or issues? Drop them in the comments below.
Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!