nerdexam
CompTIA

LX0-104 · Question #478

Which of the following lines would you expect to see in the file /etc/services?

The correct answer is C. tftp 69/udp. The /etc/services file maps service names to port numbers and protocols, allowing applications to use human-readable names instead of raw port numbers. Each entry typically lists a service name, its port number, and the protocol it uses.

Networking Fundamentals

Question

Which of the following lines would you expect to see in the file /etc/services?

Options

  • Ain.tftpd: LOCAL
  • Btftp dgram udp wait root /usr/sbin/tcpd in.tftpd
  • Ctftp 69/udp
  • Dudp 17 UDP

How the community answered

(49 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    88% (43)
  • D
    6% (3)

Why each option

The /etc/services file maps service names to port numbers and protocols, allowing applications to use human-readable names instead of raw port numbers. Each entry typically lists a service name, its port number, and the protocol it uses.

Ain.tftpd: LOCAL

in.tftpd: LOCAL is not a standard format for entries in /etc/services; in.tftpd is a daemon name, and LOCAL is not a valid protocol identifier here.

Btftp dgram udp wait root /usr/sbin/tcpd in.tftpd

tftp dgram udp wait root /usr/sbin/tcpd in.tftpd is an entry format typically found in the /etc/inetd.conf or /etc/xinetd.conf file, which configures services managed by the inetd or xinetd super-server.

Ctftp 69/udpCorrect

The /etc/services file contains a list of known services used by the Internet protocol suite. A typical entry maps a service name (like tftp) to its port number and protocol (e.g., 69/udp).

Dudp 17 UDP

udp 17 UDP is improperly formatted; while udp is a protocol, 17 is a port number, and UDP as a second protocol specifier is redundant and incorrect for the standard format.

Concept tested: /etc/services file format

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

Topics

#/etc/services#port numbers#network services#UDP/TCP

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice