How To Install nss-mdns on Rocky Linux 8

In this tutorial we learn how to install nss-mdns on Rocky Linux 8. nss-mdns is glibc plugin for .local name resolution

Introduction

In this tutorial we learn how to install nss-mdns on Rocky Linux 8.

What is nss-mdns

nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing host name resolution via Multicast DNS (aka Zeroconf, aka Apple Rendezvous, aka Apple Bonjour), effectively allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS domain .local. nss-mdns provides client functionality only, which means that you have to run a mDNS responder daemon separately from nss-mdns if you want to register the local host name via mDNS (e.g. Avahi).

We can use yum or dnf to install nss-mdns on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install nss-mdns.

Install nss-mdns on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install nss-mdns using dnf by running the following command:

sudo dnf -y install nss-mdns

Install nss-mdns on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install nss-mdns using yum by running the following command:

sudo yum -y install nss-mdns

How To Uninstall nss-mdns on Rocky Linux 8

To uninstall only the nss-mdns package we can use the following command:

sudo dnf remove nss-mdns

nss-mdns Package Contents on Rocky Linux 8

/lib64/libnss_mdns.so.2
/lib64/libnss_mdns4.so.2
/lib64/libnss_mdns4_minimal.so.2
/lib64/libnss_mdns6.so.2
/lib64/libnss_mdns6_minimal.so.2
/lib64/libnss_mdns_minimal.so.2
/usr/lib/.build-id
/usr/lib/.build-id/1c
/usr/lib/.build-id/1c/fce27d539ae938e19bc05e68e6a91c7564cc1b
/usr/lib/.build-id/90
/usr/lib/.build-id/90/93576baefea108d75ce8eaacc1328ffc392f63
/usr/lib/.build-id/95
/usr/lib/.build-id/95/49f53133c0ac88e532700d1fd9c56dc379c7ea
/usr/lib/.build-id/c1
/usr/lib/.build-id/c1/b2f6c3316b8b87100698ed26a99e5afe624d21
/usr/lib/.build-id/f8
/usr/lib/.build-id/f8/2056cd47ffbc7d1be93ece7d21274ea20c0e65
/usr/lib/.build-id/f9
/usr/lib/.build-id/f9/a91ffb9eb7f8e19bb0146ce8c33212ed94a24b
/usr/share/doc/nss-mdns
/usr/share/doc/nss-mdns/ACKNOWLEDGEMENTS.md
/usr/share/doc/nss-mdns/NEWS.md
/usr/share/doc/nss-mdns/README.md
/usr/share/licenses/nss-mdns
/usr/share/licenses/nss-mdns/LICENSE

References

Summary

In this tutorial we learn how to install nss-mdns on Rocky Linux 8 using yum and dnf.