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.
Question
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)- A2% (1)
- B4% (2)
- C88% (43)
- D6% (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.
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.
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.
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).
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
Community Discussion
No community discussion yet for this question.