Files
oldlinux-files/docs/Install-Guide/install-guide-2.2.2/node211.html
2024-02-19 00:23:35 -05:00

47 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>5.3.2.3 /etc/hosts</TITLE>
</HEAD>
<BODY>
<meta name="description" value="5.3.2.3 /etc/hosts">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html4485 HREF="node212.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html4483 HREF="node208.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html4477 HREF="node210.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html4487 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html4488 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html4486 HREF="node212.html">5.3.2.4 /etc/networks</A>
<B>Up:</B> <A NAME=tex2html4484 HREF="node208.html">5.3.2 Configuring TCP/IP on </A>
<B> Previous:</B> <A NAME=tex2html4478 HREF="node210.html">5.3.2.2 The networking rc </A>
<BR> <HR> <P>
<H3><A NAME=SECTION00732300000000000000>5.3.2.3 /etc/hosts</A></H3>
<P>
<A NAME=6087>&#160;</A>
<A NAME=6088>&#160;</A>
<tt>/etc/hosts</tt> contains a list of IP addresses and the hostnames that
they correspond to. In general, <tt>/etc/hosts</tt> only contains entries
for your local machine, and perhaps other ``important'' machines (such
as your nameserver or gateway). Your local name server will provide
address-to-name mappings for other machines on the network, transparently.
<P>
For example, if your machine is <tt>loomer.vpizza.com</tt> with the IP address
128.253.154.32, your <tt>/etc/hosts</tt> would look like:
<P><TT> <PRE>127.0.0.1 localhost
128.253.154.32 loomer.vpizza.com loomer
</PRE> <P></TT>
If you're only using
loopback, the only line in <tt>/etc/hosts</tt> should be for 127.0.0.1, with
both <tt>localhost</tt> and your hostname after it.
<P>
<BR> <HR><A NAME=tex2html4485 HREF="node212.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html4483 HREF="node208.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html4477 HREF="node210.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html4487 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html4488 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html4486 HREF="node212.html">5.3.2.4 /etc/networks</A>
<B>Up:</B> <A NAME=tex2html4484 HREF="node208.html">5.3.2 Configuring TCP/IP on </A>
<B> Previous:</B> <A NAME=tex2html4478 HREF="node210.html">5.3.2.2 The networking rc </A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>