Randomize your MAC address in Ubuntu

Windows 10 users would have probably seen the option on there Wifi settings to enable a random hardware address for networks.

This is useful when wanting to keep anonymous on public wifi connections or even to get more data from connections that have set data limits for a connection.

For Ubuntu this is also possible but unfortunately the setup is a little more complicated than a one click button, but here is one way of enabling it.

  1. Ctrl + Alt + T to start Terminal
  2. Change to the /etc/NetworkManager/conf.d

cd /etc/NetworkManager/conf.d

3. create a conf file called 00-macrandomize.conf

sudo touch 00-macrandomize.conf 

4. Edit the file

sudo nano 00-macrandomize.conf

5. Copy this config in to the file and save it

[device]
wifi.scan-rand-mac-address=yes

[connection]
wifi.cloned-mac-address=random
ethernet.cloned-mac-address=random
connection.stable-id=${CONNECTION}/${BOOT}

6. Now restart the NetworkManager

 systemctl restart NetworkManager 

Now when you check the MAC address you should see the new random address.

About the Author: Phil

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *