How to temporarily change the MAC address of an interface in Linux

Home > Search > How-to
  by

The ifconfig command can be used to temporary change the MAC address of the interface. If the interface is brought down and then back up, or if the network service is restarted, or if the OS is restarted, the interface will use the settings in /etc/sysconfig/network-scripts/ifcfg-xxxxxxxxx or /etc/network/interfaces.

[root@server1 ~]# ifconfig eth0 hw ether 01:23:45:ab:cd:ef

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments