With macchanger, you don't have to memorize the original MAC address of your device for future reference. To assign a custom MAC address to the eth0 interface: sudo macchanger -m 44:ee:bc:6c:76:ba eth0 where custom-address is the new MAC address you want to assign and interface is the name of the network interface. Simply use the -m flag with the default command as follows: sudo macchanger -m custom-address interface In addition to assigning a random address, you can also set a custom MAC address for your device. Select No and press Enter to continue.īefore getting practical, first, you need to check the network interface names on your device. You will see a prompt asking whether you want to change your system's MAC address every time you restart a network device (including ethernet and Wi-Fi).
To install macchanger on Arch Linux: sudo pacman -S macchanger On Fedora, CentOS, or other RHEL-based distros: sudo dnf install macchanger To install it on Debian/Ubuntu: sudo apt install macchanger
Macchanger is a terminal-based Linux utility that allows a user to change the default MAC address of their device. Here's how you can spoof your MAC address on Linux. Whatever the reason be, Linux tools have got you covered. Maybe you want to bypass security restrictions on a network, or maybe you wish to imitate another device on the network to capture packets. There are loads of reasons why you might want to change your device's MAC address. In the OSI model of networking, MAC addresses are responsible for sending data to the correct device in the Data Link layer. It is because of MAC addresses that you are able to uniquely identify millions of devices connected to the internet. Here's how a MAC address looks like: 55:de:bc:7d:45:dfĮach device is assigned a unique MAC address during its manufacture. It is also known as the "physical address" of a machine since it is embedded in the Network Interface Card (NIC) of the device.
But finding a reliable and stable utility that does the job well is really complicated considering the number of choices available to a user.īy the end, you will have a brief understanding of MAC addresses, and how to spoof your MAC address on Linux.Ī MAC address, or Media Access Control address, is a unique hexadecimal identifier used to identify a device on a network. On Linux, you can find countless tools to change your device's MAC address. This way, you can receive data packets that were originally meant for the other device. If you provide incorrect password, the command would fail with the error message “ Logon failure: unknown user name or bad password.Modifying your system's MAC address allows you to impersonate other devices on the same network.
If you try this for a Linux machine you would get the error “ The RPC server is unavailable.” Using getmac command we can retrieve the mac addresses of the machines running windows OS only.
You will be prompted to enter the password and the command execution will take place after that.
If you do not want to specify the password, you can skip /p parameter. Just run the command getmac to get the mac addresses. It works on XP, Vista, Windows 7, Server 2003 and Server 2008 operating systems. Below are few examples on how to use this command. This can be used to get mac address for remote computers also. We can find mac address (physical address) of a computer using the command ‘ getmac‘.