LFCS · 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. /etc/services lists common network services and their corresponding port numbers and protocols.
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
(34 responses)- A3% (1)
- B6% (2)
- C88% (30)
- D3% (1)
Why each option
/etc/services lists common network services and their corresponding port numbers and protocols.
This format does not correspond to an entry in /etc/services; it resembles a configuration entry for a specific daemon or a name service switch.
This line is characteristic of a service definition found in /etc/inetd.conf or /etc/xinetd.d/tftp, used for configuring services managed by a super-server, not /etc/services.
The line 'tftp 69/udp' correctly follows the format of the /etc/services file, mapping the service name 'tftp' to its standard port number 69 and specifying the UDP protocol.
The line 'udp 17 UDP' is incorrect; port 17 is for the QOTD service, and the format is inconsistent with /etc/services (e.g., it should be 'qotd 17/udp').
Concept tested: Linux /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.