1. Open a terminal window.
2. nano /etc/network/if-pre-up.d/changemac
Note: Any filename will do. For convenience in this howto, I’ll use changemac.
3. Paste the following code:
macchanger -r wlan0
4. Replace wlan0 with your network interface.
5. Save and exit nano.
6. chmod +x /etc/network/if-pre-up.d/changemac
Note: be sure to remove any custom changemac script you have added to your startup application.
That’s it. Restart your computer and ifconfig to check your mac. No need to add a custom script on your startup list which will only run much later in the boot process where some daemons might have already connected to the network or internet.