Translate

Archives

RHEL/CentOS 7: Revert To Old Network Interface Naming Convention

RHEL/CentOS 7 uses SystemD predictable network interface names. This post shows you how to rename a network interfcae to eth0,/em>without modifying the kernel commnad line or any udev rules, and without requiring a sytem reboot.

List All Network Interfaces on Red Hat

The following script will list all non-loopback networking interfaces on a Fedora, Red Hat or downstream distribution. #!/bin/bash interfaces=$(ls /etc/sysconfig/network-scripts/ifcfg-* | LC_ALL=C sed -e “$__sed_discard_ignored_files” -e ‘/(ifcfg-lo$|:|ifcfg-.*-range)/d’ -e ‘{ s/^ifcfg-//g;s/[0-9]/ &/}’ | LC_ALL=C sort -k 1,1 -k 2n | LC_ALL=C sed ‘s/ //’) echo $interfaces | tr ” ” “n” It ignores any aliases and outputs the interfaces one per line.