mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-31 11:21:59 +00:00
1d317bbf05
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4440 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
44 lines
1.6 KiB
XML
44 lines
1.6 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
%general-entities;
|
|
]>
|
|
<sect1 id="ch-scripts-hosts">
|
|
<title>Creating the /etc/hosts file</title>
|
|
<?dbhtml filename="hosts.html"?>
|
|
|
|
<indexterm zone="ch-scripts-hosts"><primary sortas="e-/etc/hosts">/etc/hosts</primary></indexterm>
|
|
|
|
<indexterm zone="ch-scripts-hosts">
|
|
<primary sortas="d-localnet">localnet</primary>
|
|
<secondary>/etc/hosts</secondary></indexterm>
|
|
|
|
<indexterm zone="ch-scripts-hosts">
|
|
<primary sortas="d-network">network</primary>
|
|
<secondary>/etc/hosts</secondary></indexterm>
|
|
|
|
<para>If a network card is not going to be configured, create the
|
|
<filename>/etc/hosts</filename> file by running:</para>
|
|
|
|
<screen><userinput>cat > /etc/hosts << "EOF"
|
|
# Begin /etc/hosts (no network card version)
|
|
|
|
127.0.0.1 <replaceable>[<value of HOSTNAME>.example.org]</replaceable> <replaceable>[value of HOSTNAME]</replaceable> localhost
|
|
|
|
# End /etc/hosts (no network card version)
|
|
EOF</userinput></screen>
|
|
|
|
<para>If a network card is to be configured, create the
|
|
<filename>/etc/hosts</filename> file by running:</para>
|
|
|
|
<screen><userinput>cat > /etc/hosts << "EOF"
|
|
# Begin /etc/hosts (network card version)
|
|
|
|
127.0.0.1 localhost
|
|
<replaceable>[192.168.1.1]</replaceable> <replaceable>[<value of HOSTNAME>.example.org]</replaceable> <replaceable>[value of HOSTNAME]</replaceable>
|
|
|
|
# End /etc/hosts (network card version)
|
|
EOF</userinput></screen>
|
|
|
|
</sect1>
|