In this tutorial, How to Change Mac Address in Linux. Mac Address is used to identify the device between the multiple devices within the network.
Mac Address is unique address used to identify the device over the network. When change Mac address to help for anonymity over the network.
How to Change Mac Address in Linux
1. Open the terminal, List all network interface your server. Use the command line below:
ip link show
The output terminal below:
2. Select the network interface which you want change the mac address. ( For example: I select docker0 network interface.)
3. You need down network interface to change Mac address.
sudo ifconfig docker0 down
4. For example, Change 02:42:c2:c6:e8:39 to 02:42:b2:b6:c8:40 with the Mac address you want.)
sudo ifconfig docker0 hw ether 02:42:b2:b6:c8:40
5. Up the network inteface
sudo ifconfig docker0 up
The result, Change Mac Address in Linux as the picture below:
Your mac address has changed temporarily.