71 lines
1.9 KiB
Groff
71 lines
1.9 KiB
Groff
'\"macro stdmacro
|
|
.\" Copyright (c) 1983 Regents of the University of California.
|
|
.\" All rights reserved. The Berkeley software License Agreement
|
|
.\" specifies the terms and conditions for redistribution.
|
|
.\"
|
|
.\" @(#)services.4 6.2 (Berkeley) 5/6/86
|
|
.\"
|
|
.if n .pH man4.services @(#)servicesn 30.3 of 2/1/86
|
|
.TH SERVICES 4
|
|
.UC 5
|
|
.SH NAME
|
|
services \- service name database
|
|
.SH DESCRIPTION
|
|
The
|
|
.B /etc/services
|
|
file contains information regarding
|
|
the known services available in the
|
|
Internet.
|
|
For each service a single line should be present
|
|
with the following information:
|
|
.RS 3
|
|
.IP \(bu 2
|
|
official service name
|
|
.IP \(bu 2
|
|
port number
|
|
.IP \(bu 2
|
|
protocol name
|
|
.IP \(bu 2
|
|
aliases (optional)
|
|
.RE
|
|
.PP
|
|
Items are separated by any number of blanks and/or
|
|
tab characters. The port number and protocol name
|
|
are considered a single
|
|
.IR item ;
|
|
a ``/'' is used to
|
|
separate the port and protocol (e.g. ``512/tcp'').
|
|
A ``#'' indicates the beginning of
|
|
a comment; characters up to the end of the line are
|
|
not interpreted by routines which search the file.
|
|
.PP
|
|
Service names may contain any printable
|
|
character other than a field delimiter, newline,
|
|
or comment character.
|
|
For example,
|
|
.Ex
|
|
smtp 25/tcp mail
|
|
.Ee
|
|
.SH "DETERMINING USAGE"
|
|
It is sometimes useful to be able to determine which processes are using
|
|
a particular port. This can be accomplished using the \f2fuser\f1(1M) command.
|
|
For example, in order to see which processes are listening on TCP port 25, the command
|
|
.Ex
|
|
fuser 25/tcp
|
|
.Ee
|
|
can be used. Note that \f2fuser\fP only accepts service names in their
|
|
numeric form; symbolic names such as ``smtp'' cannot be used.
|
|
.SH FILES
|
|
/etc/services
|
|
.PP
|
|
If the
|
|
.SM NFS
|
|
option is installed and NIS is running,
|
|
the \f2getservent\f1(3N) library routines only access this file
|
|
if no entry was found in the NIS database.
|
|
.SH "SEE ALSO"
|
|
fuser(1M), getservent(3N)
|
|
.SH BUGS
|
|
A name server should be used instead of a static file.
|
|
'\".so /pubs/tools/origin.bsd
|