Jump to content

How to change the MAC address on Ubuntu 20.04 using Macchanger


aum

Recommended Posts

Macchanger is an amazing Linux utility that can be used to view as well as to change the MAC address of any desired networking device. This utility can be conveniently installed on any Linux distribution and then you can use it just the way you like. In this article, we will begin with the installation of this utility on a Ubuntu 20.04 or Linux Mint 20 system and then we will teach you how you can change the MAC address with the help of this utility.

 

Changing the MAC Address on a Ubuntu System using Macchanger


To use the Macchanger utility for changing the MAC address on a Linux Mint 20 machine, you will have to proceed with the followings steps:


Step # 1: Installing Macchanger on Ubuntu


First, we will install the Macchanger utility on our system by running the command shown below:

 

$ sudo apt install macchanger

 

word-image-2921.png

 

 

During the installation of this utility, a dialogue box will be presented to you asking whether you want the MAC address to be changed automatically or not. You can choose any option according to your needs, however, we have chosen the “Yes” option as shown in the following image:

 

word-image-2922.png

 

Step # 2: Listing all the Network Interfaces


After successfully installing the Macchanger utility on your system, you need to list down all the network interfaces so that you can pick out the one whose MAC address you want to change. To list down all the network interfaces on your system, you will have to execute the command shown below:

 

$ ip addr

 

word-image-2924.png

 

Step # 3: Checking the Current MAC Address of a Specific Network Interface using Macchanger:


Before changing the MAC address of the specified network interface, we will first try to check its current MAC address with the command shown below:

 

$ macchanger –s enp0s3

 

word-image-2925.png

 

You can replace this interface name with the name of your desired interface. The current MAC address of this interface is highlighted in the following image:

 

word-image-2926.png

 

 

Step # 4: Randomly Changing the MAC Address of a Specific Network Interface using Macchanger:


Now, we will try to assign a random MAC address to the specified network interface by executing the command shown below:

 

$ sudo macchanger -r enp0s3

 

word-image-2927.png

 

Again, you can replace the interface name in this command with the name of your desired interface. The new MAC address is highlighted in the following image:

 

word-image-2928.png

 

You can also confirm that the MAC address of the specified network interface has been changed with the help of the command that we used in step # 3 as shown in the image below:

 

word-image-2929.png

 

Step # 5: Manually Changing the MAC Address of a Specific Network Interface using Macchanger:


We can also assign a MAC address of our choice to the specified network interface manually. For that, we can make use of the following command:

 

$ sudo macchanger –m c2:43:bc:1c:62:01 enp0s3

 

word-image-2930.png

 

In this command, we can have any MAC address of our choice provided that it is in the correct format. Moreover, you can also change the interface name with the name of your desired interface. The newly assigned MAC address is highlighted in the image shown below:

 

word-image-2931.png

 

You can also confirm that the MAC address of the specified network interface has been changed manually with the help of the command that we used in step # 3 as shown in the following image:

 

word-image-2932.png

 

Step # 6: Restoring the Actual MAC Address of a Specific Network Interface using Macchanger:


Finally, we will attempt to restore the original MAC address of the specified network interface using the command shown below:

 

$ sudo macchanger –p enp0s3

 

word-image-2933.png

 

When you will execute the above-mentioned command, you will notice that now the permanent and the new MAC addresses of the specified network interface are the same which means that the original MAC address of that network interface has been restored successfully as highlighted in the following image:

 

word-image-2934.png

 

Conclusion


With the help of this tutorial, you can easily install the Macchanger utility on your Ubuntu 20.04 or Linux Mint 20 system and then you can use it for viewing and changing the MAC address of any desired networking device or a network interface.

 

Source

 

 

Link to comment
Share on other sites


  • Views 1.6k
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...