Linux Commands - ifconfig command (temporarily change the MAC address)

by
Jeremy Canfield |
Updated: March 23 2020
| Linux Commands articles
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
Did you find this article helpful?
If so, consider buying me a coffee over at