Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to write /etc/hosts without dns domain name
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
fangwen
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2011
Posts: 128
Location: Shanghai, China

PostPosted: Sun Nov 06, 2011 2:56 pm    Post subject: How to write /etc/hosts without dns domain name Reply with quote

I followed the installation guide and ran the following commands during installation:
Code:
# ln -s net.lo net.eth0
# rc-update add net.eth0 default

And resolv.conf is overwritten at every bootup. I then deleted my dns domain name in /etc/conf.d/net and this issue was solved. But how should I write /etc/hosts without a dns domain name. Is this OK:
Code:
127.0.0.1 localhost
::1       localhost

Also, could anyone explain to me why it will overwrite resolv.conf if I set my dns domain name?
_________________
All operating systems suck. This one just sucks less.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22672

PostPosted: Sun Nov 06, 2011 4:38 pm    Post subject: Reply with quote

When you set your DNS domain, then /etc/resolv.conf needs to specify that domain so that unqualified names will search your local domain instead of failing.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum