How To Install prefixdevname on CentOS 8
Introduction
In this tutorial we learn how to install prefixdevname
on CentOS 8.
What is prefixdevname
This package provides udev helper utility that tries to consistently name all ethernet NICs using user defined prefix (e.g. net.ifnames.prefix=net produces NIC names net0, net1, …). Utility is called from udev rule and it determines NIC name and writes out configuration file for udev’s net_setup_link built-in (e.g. /etc/systemd/network/71-net-ifnames-prefix-net0.link).
We can use yum
or dnf
to install prefixdevname
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install prefixdevname.
Install prefixdevname on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install prefixdevname
using dnf
by running the following command:
sudo dnf -y install prefixdevname
Install prefixdevname on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install prefixdevname
using yum
by running the following command:
sudo yum -y install prefixdevname
How To Uninstall prefixdevname on CentOS 8
To uninstall only the prefixdevname
package we can use the following command:
sudo dnf remove prefixdevname
prefixdevname Package Contents on CentOS 8
/usr/lib/.build-id
/usr/lib/.build-id/bc
/usr/lib/.build-id/bc/e4b729729962d0b9e846c7cf7f974902cdd93d
/usr/lib/dracut/modules.d/71prefixdevname
/usr/lib/dracut/modules.d/71prefixdevname-tools
/usr/lib/dracut/modules.d/71prefixdevname-tools/module-setup.sh
/usr/lib/dracut/modules.d/71prefixdevname/module-setup.sh
/usr/lib/udev/prefixdevname
/usr/lib/udev/rules.d/71-prefixdevname.rules
/usr/share/doc/prefixdevname
/usr/share/doc/prefixdevname/README.md
/usr/share/licenses/prefixdevname
/usr/share/licenses/prefixdevname/LICENSE
References
Summary
In this tutorial we learn how to install prefixdevname
on CentOS 8 using yum and dnf.