{"id":4483,"date":"2022-12-20T18:08:47","date_gmt":"2022-12-20T21:08:47","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/services-man5\/"},"modified":"2022-12-20T18:08:47","modified_gmt":"2022-12-20T21:08:47","slug":"services-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/services-man5\/","title":{"rendered":"SERVICES (man5)"},"content":{"rendered":"<h1 align=\"center\">SERVICES<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">services \u2212 Internet network services list<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>services<\/b> 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 <b>getservent<\/b>(3), <b>getservbyname<\/b>(3), <b>getservbyport<\/b>(3), <b>setservent<\/b>(3), and <b>endservent<\/b>(3) support querying this file from programs.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">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.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Port numbers below 1024 (so-called &#8220;low numbered&#8221; ports) can be bound to only by root (see <b>bind<\/b>(2), <b>tcp<\/b>(7), and <b>udp<\/b>(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.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The presence of an entry for a service in the <b>services<\/b> file does not necessarily mean that the service is currently running on the machine. See <b>inetd.conf<\/b>(5) for the configuration of Internet services offered. Note that not all networking services are started by <b>inetd<\/b>(8), and so won\u2019t appear in <b>inetd.conf<\/b>(5). In particular, news (NNTP) and mail (SMTP) servers are often initialized from the system boot scripts.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The location of the <b>services<\/b> file is defined by <b>_PATH_SERVICES<\/b> in <i><netdb.h><\/i>. This is usually set to <i>\/etc\/services<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Each line describes one service, and is of the form:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>service-name\u00a0\u00a0\u00a0port<\/i><b>\/<\/b><i>protocol\u00a0\u00a0\u00a0<\/i>[<i>aliases &#8230;<\/i>]<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p>where:<\/p>\n<\/td>\n<td width=\"80%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><i>service-name<\/i><\/p>\n<p style=\"margin-left:22%;\">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 <i>service-name<\/i>.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"6%\">\n<p><i>port<\/i><\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"78%\">\n<p>is the port number (in decimal) to use for this service.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><i>protocol<\/i><\/p>\n<p style=\"margin-left:22%;\">is the type of protocol to be used. This field should match an entry in the <b>protocols<\/b>(5) file. Typical values include <b>tcp<\/b> and <b>udp<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><i>aliases<\/i><\/p>\n<p style=\"margin-left:22%;\">is an optional space or tab separated list of other names for this service. Again, the names are case sensitive.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Either spaces or tabs may be used to separate the fields.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Comments are started by the hash sign (#) and continue until the end of the line. Blank lines are skipped.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>service-name<\/i> should begin in the first column of the file, since leading spaces are not stripped. <i>service-names<\/i> 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\u2212z, 0\u22129, and hyphen (\u2212) would seem a sensible choice.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Lines not matching this format should not be present in the file. (Currently, they are silently skipped by <b>getservent<\/b>(3), <b>getservbyname<\/b>(3), and <b>getservbyport<\/b>(3). However, this behavior should not be relied on.)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This file might be distributed over a network using a network-wide naming service like Yellow Pages\/NIS or BIND\/Hesiod.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A sample <b>services<\/b> file might look like this:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">netstat 15\/tcp <br \/> qotd 17\/tcp quote <br \/> msp 18\/tcp # message send protocol <br \/> msp 18\/udp # message send protocol <br \/> chargen 19\/tcp ttytst source <br \/> chargen 19\/udp ttytst source <br \/> ftp 21\/tcp <br \/> # 22 \u2212 unassigned <br \/> telnet 23\/tcp<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/etc\/services<\/i><\/p>\n<p style=\"margin-left:22%;\">The Internet network services list<\/p>\n<p style=\"margin-left:11%;\"><i><netdb.h><\/i><\/p>\n<p style=\"margin-left:22%;\">Definition of <b>_PATH_SERVICES<\/b><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>listen<\/b>(2), <b>endservent<\/b>(3), <b>getservbyname<\/b>(3), <b>getservbyport<\/b>(3), <b>getservent<\/b>(3), <b>setservent<\/b>(3), <b>inetd.conf<\/b>(5), <b>protocols<\/b>(5), <b>inetd<\/b>(8)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Assigned Numbers RFC, most recently RFC\u00a01700, (AKA STD0002).<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> 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\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  services \u2212 Internet network services list <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1456],"class_list":["post-4483","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-services"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4483"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4483\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}