CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

Hostname and Name Resolution

One objective, and one tool choice that matters more than it looks: `dig` and `host` query DNS directly and ignore `/etc/hosts`, so they can report a failure for a name that resolves perfectly well. `getent hosts` uses the same path an application does.

Basic Networking Guide 50 of 67 Beginner

Written against the versions above. **`/etc/resolv.conf` is generated by NetworkManager on RHEL.** Editing it by hand works until the next connection change overwrites it. The durable setting is `ipv4.dns` on the connection profile.

Every command on this page runs on RHCSA-A01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0 (Coughlan)Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

Before you start

  1. The hostname

  2. Where a name is looked up

  3. The tool that tells you the truth

  4. DNS from the connection profile

Official sources