Renaming ethernet interfaces (RHEL & variants)
June 6th, 2012
I found a very helpful post by Jeff Schroeder on renaming ethernet interfaces on RHEL/CentOS, etc:
Jeff Schroeder January 15, 2009 at 1:50 pm
For those who don’t know, the Redhat/Fedora ifup/ifdown scripts that read the HWADDR variable are using the ip(8) command to set the names.You can rename eth5 to eth0 like this:
ip link set down eth5
ip link set eth5 name eth0Afterwards you’ll need to add an ip and up the interface with the ip(8) or ifconfig(8) commands.
—
Jeff Schroederhttp://www.digitalprognosis.com
This is very helpful when you clone a pre-configured virtual machine and don’t want the new VM to have it’s first ethernet interface named eth1. (instead of eth0 which is default)