Change MAC Address on Ubuntu - A Simple Guide

Manually Configuring Your MAC Address
Numerous motivations may lead you to desire a manual configuration of the MAC address associated with your network interface. The specific rationale is not relevant for the purpose of this guide.
To implement this change, modification of the /etc/network/interfaces file is required. Feel free to utilize your preferred text editor for this task.
Editing the Interfaces File
The following command, executed with superuser privileges, will open the file using the gedit editor:
sudo gedit /etc/network/interfaces
Within this file, locate the configuration block corresponding to your network interface, commonly identified as eth0.
If DHCP is currently enabled for this interface, the relevant lines will typically appear as follows:
auto eth0
iface eth0 inet dhcp
Adding the MAC Address
To specify a custom MAC address, introduce a new line directly beneath the existing configuration. This line should be formatted as shown below:
auto eth0
iface eth0 inet dhcp
hwaddress ether 01:02:03:04:05:06
Remember to substitute '01:02:03:04:05:06' with your desired MAC address, ensuring it adheres to the correct hexadecimal format.
Activating the Changes
After saving the modified /etc/network/interfaces file, the networking service must be restarted or the system rebooted for the new configuration to take effect.
The following command will restart the networking service:
sudo /etc/init.d/networking restart
This action will apply the newly assigned MAC address to your network interface.