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
- OSRHEL 10.0 (Coughlan)
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 12 min
- Reviewed23 August 2026
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.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 (Coughlan) | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
Before you start
- A sudo-capable account.
- The session appends one line to
/etc/hostsand removes it.
-
The hostname
-
Where a name is looked up
-
The tool that tells you the truth
-
DNS from the connection profile