services(4) — File Formats
NAME
services − Defines the sockets and protocols used for Internet services
SYNOPSIS
/etc/services
DESCRIPTION
The /etc/services file associates Internet service names and aliases with the port number and protocol used by the service. Each service is listed in this file on a single line of the form:
ServiceName PortNumber/ProtocolName Aliases
The fields contain the following information:
ServiceNameThe official Internet service name.
PortNumber/ProtocolName
The socket port number used for the service and the transport protocol used for the service.
AliasesA list of unofficial service names.
Items on a line are separated by spaces or tabs. Comments begin with a # (number sign) and continue to the end of the line.
EXAMPLES
Entries in the /etc/services file for the inetd internal services might look like this:
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
daytime 13/tcp
daytime 13/udp
chargen 19/tcp ttytst source
chargen 19/tcp ttytst source
ftp 21/tcp
time 37/tcp timeserver
time 37/udp timeserver
RELATED INFORMATION
Functions: endservent(3), getservbyname(3), getservbyport(3), getservent(3), setservent(3)
The RFC923 specification.