You are not logged in.

#1 2005-09-04 01:36:36

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Should the loopback alias in /etc/hosts be localhost?

This was something I ran across recently when installing NTP...for some reason, if I change the loopback alias to my actual machine name, the command <code>ntpq -p</code> would not work...it would reply: Name or service not known.  However, leaving the alias as localhost and trying the command again works just fine.

The reason I had altered it initially was due to Xfce giving me a warning dialog box upon startup that says it cannot find the host.  Changing my loopback line to

127.0.0.1     localhost.localdomain     servername

   instead of the default...

127.0.0.1     localhost.localdomain     localhost

eliminated that error message and Xfce would start up with no problems.  I vaguely remember reading somewhere that it should be left at localhost and not be set to your actual machine name, but I don't remember the reasoning behind it.  Do I really have to choose one error or the other?  Any thoughts?

Offline

#2 2005-09-04 03:40:22

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Should the loopback alias in /etc/hosts be localhost?

just add it. put em both in there.

127.0.0.1 localhost.localdomain localhost servername


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-09-04 04:10:04

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Should the loopback alias in /etc/hosts be localhost?

Ahhh...never knew you could do that.  I'll give that a shot once I get home and let you know if it worked.  Thanks Mr. Prickly!

Offline

#4 2005-09-05 01:49:24

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Should the loopback alias in /etc/hosts be localhost?

Yep...that seemed to fix it right up.  Thanks again!

Offline

Board footer

Powered by FluxBB