nerdexam
LPI

010-100 · Question #35

Which files will affect the domain name resolution system on Linux? (Choose TWO answers)

The correct answer is C. /etc/hosts E. /etc/resolv.conf. Linux name resolution relies on /etc/hosts for static hostname-to-IP mappings and /etc/resolv.conf for DNS server configuration.

The Linux Operating System

Question

Which files will affect the domain name resolution system on Linux? (Choose TWO answers)

Options

  • A/etc/hostname
  • B/etc/nameserver
  • C/etc/hosts
  • D/etc/which
  • E/etc/resolv.conf

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    7% (2)
  • C
    80% (24)
  • D
    10% (3)

Why each option

Linux name resolution relies on /etc/hosts for static hostname-to-IP mappings and /etc/resolv.conf for DNS server configuration.

A/etc/hostname

The /etc/hostname file stores only the local machine's own hostname for identification purposes and has no effect on how the system resolves names for remote hosts.

B/etc/nameserver

The file /etc/nameserver does not exist as a standard Linux configuration file; nameserver addresses are specified as 'nameserver' directives inside /etc/resolv.conf, not in a separate file.

C/etc/hostsCorrect

The /etc/hosts file is a static local lookup table that maps hostnames to IP addresses and is queried by the system resolver before any DNS server is contacted, directly influencing domain name resolution.

D/etc/which

The file /etc/which does not exist on Linux systems and plays no role in name resolution or any other standard system function.

E/etc/resolv.confCorrect

The /etc/resolv.conf file defines the IP addresses of DNS nameservers and optional search domain suffixes used by the resolver library, making it the primary configuration file for all DNS-based name resolution on the system.

Concept tested: Linux DNS and hostname resolution configuration files

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

Topics

#DNS resolution#/etc/hosts#/etc/resolv.conf#name resolution

Community Discussion

No community discussion yet for this question.

Full 010-100 Practice