Ubuntu can use a different Media Access Control (MAC) address for one network connection, Use NetworkManager when you want the setting to survive reconnects, or use ip link for a temporary change that lasts only until the interface is reset.
A MAC address identifies a network interface on the local network, Changing it can help when a network expects a different hardware address, but it does not replace network authentication and it can disconnect your current session.
Choose the right method
Use the graphical Settings route or nmcli for a saved NetworkManager connection, Use ip link only for a short-lived change, such as checking how a device behaves with a locally administered address.
Persistent connection setting
NetworkManager stores a cloned MAC address with the connection profile, Its current Ethernet setting accepts an explicit address and values such as random or stable, while nmcli continues to expose the setting as cloned-mac-address.
Temporary interface change
The ip link command changes the active interface address, Bringing the interface down first avoids changing a device while it is carrying traffic, and reconnecting or restarting NetworkManager can restore the profile value.
Change the MAC address in Ubuntu Settings
The retained screenshots show the connection editor path used by Ubuntu desktop releases, Open the connection you use, find the identity or hardware-address setting, enter the new value, apply it, then reconnect the network.
Confirm that the profile belongs to the Ethernet or Wi-Fi connection you intend to change before entering an address, After saving it, reconnect and verify the address from the terminal rather than relying on the editor alone.








Set a persistent MAC address with nmcli
First list the saved connection profiles and copy the connection name exactly, This route changes the profile, so it is better suited to a laptop connection than a one-off interface experiment.
nmcli connection show
Set an explicit locally administered address, then reactivate the profile, Replace Ethernet connection 1 and the sample address with values for your system.
sudo nmcli connection modify 'Wired connection 1' 802-3-ethernet.cloned-mac-address 02:11:22:33:44:55
sudo nmcli connection up 'Wired connection 1'
For an Ethernet profile, NetworkManager documents random and stable as supported values too, Use stable when you need a consistent address for that profile and random when a new address on reconnect is appropriate.
sudo nmcli connection modify 'Wired connection 1' 802-3-ethernet.cloned-mac-address stable
sudo nmcli connection up 'Wired connection 1'
Change an address temporarily with ip link
Find the interface name first, The output includes entries such as enp1s0 for Ethernet and wlp2s0 for Wi-Fi, The networking, IP configuration, and DNS guide provides useful context for the address and route checks that follow.
ip link show
Then take that interface down, set the address, and bring it back up, Do not run this remotely unless you have an alternate way back into the machine.
sudo ip link set dev enp1s0 down
sudo ip link set dev enp1s0 address 02:11:22:33:44:55
sudo ip link set dev enp1s0 up
The IP command covers the same link-management family, The address should be a valid unicast value, and a locally administered address normally begins with 02.
Verify the address and recover if the connection drops
Check the link-layer address after reconnecting, The line beginning with link/ether is the active MAC address.
ip link show dev enp1s0
If the connection fails, restore the profile to the permanent hardware address and reactivate it.
sudo nmcli connection modify 'Wired connection 1' 802-3-ethernet.cloned-mac-address permanent
sudo nmcli connection up 'Wired connection 1'
Use netstat and ss to inspect listening services, firewalls, SELinux, and AppArmor when policy blocks traffic, and the SSH command only when you have a safe alternate management path.
What changing a MAC address does not do
A MAC address is visible on the local network segment, not across the entire internet path, It does not hide your IP address from services, bypass a login portal, or grant access to a network that requires credentials.
Use a connection profile for repeatable behavior, verify with ip link, and keep the permanent setting available as your recovery path.
