LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-30-2014, 11:24 AM   #1
Roy_SRC
Member
 
Registered: Jul 2014
Posts: 81

Rep: Reputation: Disabled
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

Last edited by Roy_SRC; 07-30-2014 at 11:37 AM.
 
Old 07-30-2014, 12:16 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can my script change my hosts file and fetch the password in a txt file i have tmtkobedmx8 Linux - Newbie 6 05-15-2014 12:55 PM
[SOLVED] Missing characters in xterm after customizing local .bashrc file. remuda Linux - Newbie 6 09-15-2012 11:03 AM
Customizing STDERR redirection to a file cthugr Linux - Newbie 3 12-28-2011 07:32 AM
does the /etc/hosts file work same as the M$ hosts file? Lleb_KCir Linux - Software 6 04-03-2004 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration