How to Change Mac Address Easily on GNU/Linux

In some cases, we must change or fake our original mac address when surfing the internet or when using online services. Either the mac address is banned or indeed you are worried about the theft of data from the site or service that you are using.
The way to change the mac address on Linux is very easy. You can use a macchanger.



How to Install Macchanger on GNU / Linux

The method is very easy because the mainstream distribution is already available in the repository.

Ubuntu and Debian

sudo apt install macchanger

Fedora, CentOS, RHEL

sudo yum install macchanger

Arch Linux

pacman -S macchanger

How to Use a Macchanger on GNU / Linux

First, we check the name of the interface we are using.
ifconfig
For example, here I use a WiFi connection and the interface name is wlan0.
Link encap:Ethernet HWaddr 18:b4:30:e3:ce:07
Now we turn off the wlan0 interface first
sudo ifconfig wlan0 down
Then go home mac address with macchanger
sudo macchanger -r wlan0
The above command to change macs randomly.
sudo macchanger -a wlan0
To change the mac address with the same type as the current mac address.
Example output:
Current MAC: 00:12:be:e3:ce:07 (Astek Corporation) Permanent MAC: 90:xx:9a:e3:ce:xx (unknown) New MAC: 00:a0:6f:e3:ce:07 (THE APPCON GROUP, INC.)
For other commands, you can check with the command
macchanger --help
If everything is OK, restart the wlan0 interface.
sudo ifconfig wlan0 up
Then connect to WiFi. Mac Address must have changed. If you want to return to the original address, use the command
macchanger -p wlan0
Finished

Using Command Ip

If you use the macchanger command, it is too complicated because you have to install it first, you can use the IP command. For the discussion on the Change Mac Address Using the IP Command.
Keep in mind, this method is only used temporarily. We cannot replace the original mac address on the computer that we use because it is permanent.

Related Posts

Post a Comment

Subscribe Our Newsletter