nerdexam
CompTIA

XK0-004 · Question #389

A Linux administrator wants to resolve a remote server name locally. When of the following files should the administrator modify?

The correct answer is A. /etc/hosts. The /etc/hosts file is a static local lookup table that maps hostnames to IP addresses, allowing name resolution without relying on DNS.

Server Side & Network Concepts

Question

A Linux administrator wants to resolve a remote server name locally. When of the following files should the administrator modify?

Options

  • A/etc/hosts
  • B/etc/resorv.conf
  • C/etc/network
  • D/ett/rpc

How the community answered

(39 responses)
  • A
    95% (37)
  • B
    3% (1)
  • D
    3% (1)

Why each option

The /etc/hosts file is a static local lookup table that maps hostnames to IP addresses, allowing name resolution without relying on DNS.

A/etc/hostsCorrect

The /etc/hosts file on Linux is consulted before DNS queries by default, making it the correct place to add a static hostname-to-IP mapping for a remote server. An administrator edits this file to resolve a specific remote server name locally by adding an entry in the format 'IP hostname'. This approach is immediate and requires no DNS infrastructure changes.

B/etc/resorv.conf

/etc/resolv.conf configures the DNS resolver settings such as nameserver addresses and search domains, but does not contain static hostname mappings.

C/etc/network

/etc/network (or /etc/network/interfaces) defines network interface parameters like IP address and gateway, not hostname resolution records.

D/ett/rpc

/etc/rpc maps RPC program names to their program numbers for remote procedure call services, which is unrelated to hostname resolution.

Concept tested: Static local hostname resolution via /etc/hosts

Source: https://man7.org/linux/man-pages/man5/hosts.5.html

Topics

#/etc/hosts#local name resolution#hostname mapping#DNS

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice