

You have successfully changed the MAC address in true Linux style. Now, verify new MAC address: ip link show enp0s31f6 In other words, MAC addresses have historically been static and unique to each device. Next, set the new MAC using command: sudo ip link set dev enp0s31f6 address XX:XX:XX:XX:XX:XXįinally, turn the network back on with this command: sudo ip link set dev enp0s31f6 up MAC addresses are usually assigned when the device is manufactured and, unlike IP addresses, they generally do not change when moving from one network to another.

I would recommend using Macchanger but if you don’t want to use it, there is another way to change the MAC address in Linux.įirst, turn off the network card using command: sudo ip link set dev enp0s31f6 down Method 2: Changing Mac address using iproute2 random: generate a randomized value upon each connect. The options are: permanent: use the hardware MAC preserve: don’t change the MAC address of the device upon activation. You can always check the man page for more details. connection-mac-randomization ethernet.cloned-mac-addresspermanent wifi.cloned-mac-addresspermanent and keep wifi.scan-rand-mac-addressno. Once you reboot the system, the changes will be automatically lost, and the actual MAC address will be restored again. Where XX:XX:XX:XX:XX:XX is the new MAC id that you want to change.įinally, to revert the MAC address to its original hardware value, run the following command: macchanger -p enp0s31f6 To change the MAC address to a specific value, specify any custom MAC address using command: macchanger -mac=XX:XX:XX:XX:XX:XX You will now see that MAC has been spoofed. Now, to assign any random MAC address to this network card, use: sudo macchanger -r enp0s31f6Īfter changing the MAC id, verify it using command: ip addr
#Why change network mac address how to
How to Use Macchanger to change MAC addressĭo you remember your network interface name? You got it in the Step 1 earlier. So, choose No (by pressing tab key) and hit Enter key to continue. I recommend not to run it automatically, unless you really need to change your MAC address every time.
