LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   7.3. Customizing the /etc/hosts File (https://www.linuxquestions.org/questions/linux-from-scratch-13/7-3-customizing-the-etc-hosts-file-4175512753/)

Roy_SRC 07-30-2014 11:24 AM

7.3. Customizing the /etc/hosts File
 
okay.. finally got to chapter 7.3.. now the problem seems to be with the following codes..

Code:

cat > /etc/hosts << "EOF"
# Begin /etc/hosts (network card version)

127.0.0.1 localhost
<192.168.1.1> <HOSTNAME.example.org> [alias1] [alias2 ...]

# End /etc/hosts (network card version)
EOF

and

Code:

cat > /etc/hosts << "EOF"
# Begin /etc/hosts (no network card version)

127.0.0.1 <HOSTNAME.example.org> <HOSTNAME> localhost

# End /etc/hosts (no network card version)
EOF

the first problem is which code should i run.. or should i just run both of them... the second problem is what should i replace this "<192.168.1.1> <HOSTNAME.example.org> [alias1] [alias2 ...]" with in the first code if i'm to use that that is... or should i just leave it as it is... thanks..

the codes mentioned above are here http://www.linuxfromscratch.org/lfs/...r07/hosts.html

Habitual 07-30-2014 12:16 PM

The first one...

I used "192.168.1.4 lfs" (the alias is optional, I read)

Code:

cat /etc/hostname
lfs
cat /etc/hosts
127.0.0.1 localhost slack14
192.168.1.4 lfs

Hope that helps.


All times are GMT -5. The time now is 01:54 PM.