📄 1183-1185.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:File Formats:EarthWeb Inc.-</TITLE>
</HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=05 //-->
<!-- PAGES=1103-1208 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="1181-1182.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1186-1187.html">Next</A></CENTER></P>
<A NAME="PAGENUM-1183"><P>Page 1183</P></A>
<P><B>
IDENTIFICATION
</B></P>
<P>Author: Walter F. Tichy, Purdue University, West Lafayette, IN, 47907. Manual Page Revision: 5.6; Release Date:
1995/06/05. Copyright 1982, 1988, 1989, Walter F. Tichy. Copyright 1990, 1991, 1992, 1993, 1994, 1995, Paul Eggert.
</P>
<P><B>
SEE ALSO
</B></P>
<P>rcsintro(1), ci(1), co(1), ident(1), rcs(1),
rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1), Walter F. Tichy, RCS, "A
System for Version Control," Software—Practice &
Experience, 15, 7 (July 1985), 637-654.
</P>
<P>GNU, 5 June 1995
</P>
<H3><A NAME="ch05_ 51">
resolver
</A></H3>
<P>resolver—Resolver configuration file.
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
/etc/resolv.conf
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>The resolver is a set of routines in the C library
(resolv(3)) that provides access to the Internet Domain Name System.
The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by
a process. The file is designed to be human readable and contains a list of keywords with values that provide various types
of resolver information.
</P>
<P>On a normally configured system, this file should not be necessary. The only nameserver to be queried will be on the
local machine, the domain name is determined from the host name, and the domain search path is constructed from the
domain name.
</P>
<P>The different configuration options are
</P>
<TABLE>
<TR><TD>
nameserver
</TD><TD>
Internet address (in dot notation) of a nameserver that the
resolver should query. Up to MAXNS (currently 3) nameservers may be listed, one per keyword. If there are multiple
servers, the resolver library queries them in the order listed. If no
nameserver entries are present, the default is to use the nameserver on the local machine. (The algorithm used is to try
a nameserver, and if the query times out, try the next until you run out of nameservers,
and then repeat trying all the nameservers until a maximum number of retries are made.)
</TD></TR><TR><TD>
domain
</TD><TD>
Local domain name. Most queries for names within this domain can use short
names relative to the local domain. If no domain entry is present, the domain is determined
from the local hostname returned by gethostname(2); the domain part is taken to be
everything after the first .. Finally, if the hostname does not contain a domain part, the root domain
is assumed.
</TD></TR><TR><TD>
search
</TD><TD>
Search list for hostname lookup. The search list is normally determined from the
local domain name; by default, it contains only the local domain name. This may be changed
by listing the desired domain search path following the
search keyword with spaces or tabs separating the names. Most
resolver queries will be attempted using each component of
the search path in turn until a match is found. Note that this process may be slow and
will generate a lot of network traffic if the servers for the listed domains are not local and
that queries will time out if no server is available for one of the domains.
</TD></TR><TR><TD>
</TD><TD>
The search list is currently limited to six domains with a total of 256 characters.
</TD></TR><TR><TD>
sortlist
</TD><TD>
sortlist allows addresses returned by
gethostbyname to be sorted. A sort list is specified
by IP address netmask pairs. The netmask is optional and defaults to the natural netmask
of the net. The IP address and optional network pairs are separated by slashes. Up to 10
pairs may be specified.
</TD></TR><TR><TD>
</TD><TD>
<!-- CODE SNIP //-->
<PRE>
sortlist 130.155.160.0/255.255.240.0 130.155.0.0
</PRE>
<!-- END CODE SNIP //-->
</TD></TR></TABLE>
<A NAME="PAGENUM-1184"><P>Page 1184</P></A>
<TABLE>
<TR><TD>
options
</TD><TD>
options allows certain internal
resolver variables to be modified. The syntax is
</TD></TR><TR><TD>
</TD><TD>
options option ...
</TD></TR><TR><TD>
</TD><TD>
where option is one of the following:
</TD></TR><TR><TD>
</TD><TD>
debug sets RESDEBUG in res.options.
</TD></TR><TR><TD>
</TD><TD>
ndots:n sets a threshold for the number of dots that must appear in a name given
to res_query (see resolver(3)) before an initial absolute query will be made. The default for
n is 1, meaning that if there are any dots in a name, the name will be tried first as an
absolute name before any search list elements are appended to it.
</TD></TR></TABLE>
<P>The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the
last instance wins.
</P>
<P>The search keyword of a system's resolv.conf file can be overridden on a per-process basis by setting the
environment variable LOCALDOMAIN to a space-separated list of search domains.
</P>
<P>The options keyword of a system's resolv.conf file can be amended on a per-process basis by setting the
environment variable RES_OPTIONS to a space-separated list of
resolver options as explained previously.
</P>
<P>The keyword and value must appear on a single line, and the keyword (such as
nameserver) must start the line. The value follows the keyword, separated by whitespace.
</P>
<P><B>
FILES
</B></P>
<!-- CODE SNIP //-->
<PRE>
/etc/resolv.conf
</PRE>
<!-- END CODE SNIP //-->
<P><B>
SEE ALSO
</B></P>
<P>gethostbyname(3), resolver(3), hostname(7),
named(8), Name Server Operations Guide for BIND
</P>
<P>11 November 1993
</P>
<H3><A NAME="ch05_ 52">
securetty
</A></H3>
<P>securetty—File that lists ttys from which root can log in.
</P>
<P><B>
DESCRIPTION
</B></P>
<P>/etc/securetty is used by login(1); the file contains the device names of
tty lines (one per line, without leading /dev/) on which root is allowed to log in.
</P>
<P><B>
FILES
</B></P>
<!-- CODE SNIP //-->
<PRE>
/etc/securetty
</PRE>
<!-- END CODE SNIP //-->
<P><B>
SEE ALSO
</B></P>
<!-- CODE SNIP //-->
<PRE>
login(1)
</PRE>
<!-- END CODE SNIP //-->
<P>Linux, 29 December 1992
</P>
<H3><A NAME="ch05_ 53">
services
</A></H3>
<P>services—Internet network services list.
</P>
<P><B>
DESCRIPTION
</B></P>
<P>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
</P>
<A NAME="PAGENUM-1185"><P>Page 1185</P></A>
<P>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.
</P>
<P>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>
<P>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 that 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>
<P>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.
</P>
<P>The location of the services file is defined by
PATH SERVICES in /usr/include/netdb.h. This is usually set to
/etc/services.
</P>
<P>Each line describes one service and is of the form:
</P>
<!-- CODE SNIP //-->
<PRE>
service-name port/protocol [aliases ...]
</PRE>
<!-- END CODE SNIP //-->
<TABLE>
<TR><TD>
service-name
</TD><TD>
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.
</TD></TR><TR><TD>
port
</TD><TD>
The port number (in decimal) to use for this service.
</TD></TR><TR><TD>
protocol
</TD><TD>
The type of protocol to be used. This field should match an entry in the
protocols(5) file. Typical values include tcp and
udp.
</TD></TR><TR><TD>
aliases
</TD><TD>
An optional space- or tab-separated list of other names for this service (see the Bugs
section below). Again, the names are case sensitive.
</TD></TR></TABLE>
<P>Either spaces or tabs may be used to separate the fields.
</P>
<P>Comments are started by the hash sign (#) and continue until the end of the line. Blank lines are skipped.
</P>
<P>The service-name should begin in the first column of the file because 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. For example, a_z, 0_9, and hyphen (_) would seem a sensible choice.
</P>
<P>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.)
</P>
<P>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.
</P>
<P>This file might be distributed over a network using a network-wide naming service such as Yellow Pages/NIS or
BIND/Hesiod.
</P>
<P>A sample services file might look like this:
</P>
<!-- CODE //-->
<PRE>
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
</PRE>
<!-- END CODE //-->
<P><CENTER>
<a href="1181-1182.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1186-1187.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -