NAME
services - Internet network services list
DESCRIPTION
services is a plain ASCII file providing a mapping between human- friendly textual names for internet services, and their underlying assigned port numbers and protocol types. Every networking program should look into this file to get the port number (and protocol) for its service. The C library routines getservent(3), getservbyname(3), getservbyport(3), setservent(3), and endservent(3) support querying this file from programs. Port numbers are assigned by the IANA (Internet Assigned Numbers Authority), and their current policy is to assign both TCP and UDP protocols when assigning a port number. Therefore, most entries will have two entries, even for TCP-only services. Port numbers below 1024 (so-called "low numbered" ports) can be bound to only by root (see bind(2), tcp(7), and udp(7)). This is so clients connecting to low numbered ports can trust that the service running on the port is the standard implementation, and not a rogue service run by a user of the machine. Well-known port numbers specified by the IANA are normally located in this root-only space. The presence of an entry for a service in the services file does not necessarily mean that the service is currently running on the machine. See inetd.conf(5) for the configuration of Internet services offered. Note that not all networking services are started by inetd(8), and so won't appear in inetd.conf(5). In particular, news (NNTP) and mail (SMTP) servers are often initialized from the system boot scripts. The location of the services file is defined by _PATH_SERVICES in <netdb.h>. This is usually set to /etc/services. Each line describes one service, and is of the form: service-name port/protocol [aliases ...] where: service-name is the friendly name the service is known by and looked up under. It is case sensitive. Often, the client program is named after the service-name. port is the port number (in decimal) to use for this service. protocol is the type of protocol to be used. This field should match an entry in the protocols(5) file. Typical values include tcp and udp. aliases is an optional space or tab separated list of other names for this service. Again, the names are case sensitive. Either spaces or tabs may be used to separate the fields. Comments are started by the hash sign (#) and continue until the end of the line. Blank lines are skipped. The service-name should begin in the first column of the file, since leading spaces are not stripped. service-names can be any printable characters excluding space and tab. However, a conservative choice of characters should be used to minimize compatibility problems. For example, a-z, 0-9, and hyphen (-) would seem a sensible choice. Lines not matching this format should not be present in the file. (Currently, they are silently skipped by getservent(3), getservbyname(3), and getservbyport(3). However, this behavior should not be relied on.) This file might be distributed over a network using a network-wide naming service like Yellow Pages/NIS or BIND/Hesiod. A sample services file might look like this: netstat 15/tcp qotd 17/tcp quote msp 18/tcp # message send protocol msp 18/udp # message send protocol chargen 19/tcp ttytst source chargen 19/udp ttytst source ftp 21/tcp # 22 - unassigned telnet 23/tcp
FILES
/etc/services The Internet network services list <netdb.h> Definition of _PATH_SERVICES
SEE ALSO
listen(2), endservent(3), getservbyname(3), getservbyport(3), getservent(3), setservent(3), inetd.conf(5), protocols(5), inetd(8) Assigned Numbers RFC, most recently RFC 1700, (AKA STD0002).
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
More Linux Commands
manpages/list.3.html
list(3) - list routines (Library - Linux man page)..........
list_new initialises the list header list so as to create an empty list. list_addhead adds node to the head of list, returning the node just added. list_addtail
manpages/XScreenSaverAllocInfo.3.html
XScreenSaverAllocInfo(3) - X11 Screen Saver extension client
The X Window System provides support for changing the image on a display screen after a user-settable period of inactivity to avoid burning the cathode ray tube
manpages/glColor3ui.3gl.html
glColor3ui(3gl) - set the current color - Linux manual page
The GL stores both a current single-valued color index and a current four-valued RGBA color. glColor sets a new four-valued RGBA color. glColor has two major va
manpages/system-config-printer-applet.1.html
system-config-printer-applet(1) - print job manager.........
system-config-printer-applet is a print job manager for CUPS. Normally it will display a printer icon in the notification area, greyed out when there are no pri
manpages/socket.2.html
socket(2) - create an endpoint for communication (Man Page)
socket() creates an endpoint for communication and returns a descriptor. The domain argument specifies a communication domain; this selects the protocol family
manpages/XcmsQueryBlue.3.html
XcmsQueryBlue(3) - obtain black, blue, green, red, and white
The XcmsQueryBlack function returns the color specification in the specified target format for zero-intensity red, green, and blue. The XcmsQueryBlue function r
manpages/feature.3pm.html
feature(3pm) - Perl pragma to enable new features (ManPage)
It is usually impossible to add new syntax to Perl without breaking some existing programs. This pragma provides a way to minimize that risk. New syntactic cons
manpages/memcmp.3.html
memcmp(3) - compare memory areas (Library - Linux man page)
The memcmp() function compares the first n bytes (each interpreted as unsigned char) of the memory areas s1 and s2. RETURN VALUE The memcmp() function returns a
manpages/pdfdetach.1.html
pdfdetach(1) Portable Document Format (PDF) document embedde
Pdfdetach lists or extracts embedded files (attachments) from a Portable Document Format (PDF) file. OPTIONS Some of the following options can be set with confi
manpages/ypchsh.1.html
ypchsh(1) - change your password in the NIS database........
In the old days, the standard passwd(1), chfn(1) and chsh(1) tools could not be used under Linux to change the users NIS password, shell and GECOS information.
manpages/SDL_SemWaitTimeout.3.html
SDL_SemWaitTimeout(3) - Lock a semaphore, but only wait up t
SDL_SemWaitTimeout() is a varient of SDL_SemWait with a maximum timeout value. If the value of the semaphore pointed to by sem is positive (greater than zero) i
manpages/pciconfig_read.2.html
pciconfig_read(2) - pci device information handling.........
Most of the interaction with PCI devices is already handled by the kernel PCI layer, and thus these calls should not normally need to be accessed from user spac
