![]() ![]() Theres an easy way that you just need to edit /etc/network/. Stay tuned with It’s FOSS for more Linux tutorial and tips. For various reasons you might want to manually change your MAC address for your network card. You have successfully changed the MAC address in true Linux style. ![]() Step-2: List available network interfaces. Now, verify new MAC address: ip link show enp0s31f6 Method-2: Change MAC Address of Network Adapter (Persistent) Step-1: Install Macchanger on Linux. Next, set the new MAC using command: sudo ip link set dev enp0s31f6 address XX:XX:XX:XX:XX:XXįinally, turn the network back on with this command: sudo ip link set dev enp0s31f6 up I would recommend using Macchanger but if you don’t want to use it, there is another way to change the MAC address in Linux.įirst, turn off the network card using command: sudo ip link set dev enp0s31f6 down Method 2: Changing Mac address using iproute2 You can always check the man page for more details. Once you reboot the system, the changes will be automatically lost, and the actual MAC address will be restored again. ![]() Where XX:XX:XX:XX:XX:XX is the new MAC id that you want to change.įinally, to revert the MAC address to its original hardware value, run the following command: macchanger -p enp0s31f6 To change the MAC address to a specific value, specify any custom MAC address using command: macchanger -mac=XX:XX:XX:XX:XX:XX Method 2: How to find an ethernet MAC Address in Linux Using ifconfig command. ![]() You will now see that MAC has been spoofed. Now, to assign any random MAC address to this network card, use: sudo macchanger -r enp0s31f6Īfter changing the MAC id, verify it using command: ip addr How to Use Macchanger to change MAC addressĭo you remember your network interface name? You got it in the Step 1 earlier. So, choose No (by pressing tab key) and hit Enter key to continue. Well cover MAC addresses only, but for a more general overview of network interfaces, refer to Working with Network Interfaces in Java. A MAC address is the unique identifier for a physical network interface card. I recommend not to run it automatically, unless you really need to change your MAC address every time. In this tutorial, well use Java to get the MAC addresses of a local machine. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |