Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
The ONE Campaign to make poverty history

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 58 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       services is a plain ASCII file providing a mapping between
       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),   getservby­
       port(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  only  be  bound  to 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 speci­
       fied by the IANA are normally located  in  this  root-only

       The  presence  of  an  entry for a service in the services
       file does not necessarily mean that the  service  is  cur­
       rently  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_SER­
       VICES  in  /usr/include/netdb.h.   This  is usually set to

       Each line describes one service, and is of the form:

              service-name   port/protocol   [aliases ...]


                 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-

       port      is  the port number (in decimal) to use for this

       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 inter-operability problems. E.g., 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 getser­
       vent(3), getservbyname(3), and getservbyport(3).  However,
       this behaviour should not be relied on.)

       As  a  backwards  compatibility  feature,  the  slash  (/)
       between the port number and protocol name can in  fact  be
       either  a slash or a comma (,). Use of the comma in modern
       installations is depreciated.

       This file might be distributed over a network using a net­
       work-wide   naming   service   like  Yellow  Pages/NIS  or

       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


       There is a maximum of 35 aliases, due to the way the  get­
       servent(3) code is written.

       Lines  longer than BUFSIZ (currently 1024) characters will
       be ignored by getservent(3),  getservbyname(3),  and  get­
       servbyport(3).   However,  this  will  also cause the next
       line to be mis-parsed.


              The Internet network services list

              Definition of _PATH_SERVICES

Linux                       1996-01-11                SERVICES(5)

The Linux Tutorial is always looking for new contributors.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.11 Seconds