Speaktech.in

how-to-change-or-spoof-a-mac-address-in-ubuntu-and-linux-mint.



Use this command:

ip link


ifconfig

Next, you can use the Swiss-Army knife of network interface tools, ifconfig to view your networking hardware information. Use this command:

ifconfig -a


sudo ifconfig <interface name> down

If you do not have ifconfig installed, install it using:

sudo apt-get install net-tools

Now for the main task, a program that helps change the MAC address very quickly. The tool is called macchanger (the name says it all). Install it using:

sudo apt-get install macchanger

You will get a prompt asking whether you want to automatically reset the MAC address each time you connect/disconnect utilizing a network interface. Choose as you desire.

Changing the MAC address to a random value

To change the MAC address to a random value, use the following command:

sudo macchanger -r <interface name>

Changing the MAC address to a specific value

To change it to a particular number, you must enter the command in the following format:

sudo macchanger -m xx:xx:xx:xx:xx:xx <interface name>

Restore original MAC address

To restore the original, or ‘permanent’ MAC address, use the following command:

sudo macchanger -p <interface name>