|
» |
|
|
|
You can use any text editor to edit the /etc/hosts file. If you are not running BIND, you can
use HP SMH. If
no /etc/hosts file exists on your system, copy /usr/newconfig/etc/hosts to /etc/hosts, or use FTP to copy another system’s/etc/hosts file to your system. See the ftp(1) manpage for more information. Make
sure the /etc/hosts file contains the following
line: 127.0.0.1 localhost loopback
|
Add
your own host’s IP address, name, and aliases to the /etc/hosts file, as in the following example: 15.nn.xx.103 wszx6 patrick
|
The first field is the IP address, the second
is the official host name (as returned by the hostname command), and any remaining fields are aliases. See the hosts(4) manpage. If
the system has more than one network card, add a line to /etc/hosts for each IP address. The entries for the additional
cards should have the same official host name but different aliases
and different IP addresses. Add
the names of any other hosts that you need to reach. If you will be
using a BIND or NIS server on a different host, add the name of that
host. If your site uses DNS (Domain Name
Service) or NIS (Network Information Service), /etc/hosts acts as a backup resource in case the name server goes down; so
it is a good idea to add the names of systems that the local system
frequently needs to reach.
|