✓ Solved

Unable to resolve host

I changed localhost to another more descriptive and now I get a message from sudo telling me the name or service is not known. Everything seems to be working except this message which is a little annoying. How can I resolve so this message disappears?

1 Reply

✓ Best Answer

I changed localhost to another more descriptive

Patient: Doc…it hurts when I do this…

Doctor: Don't do that!

Just because you can do something doesn't mean that you shouldlocalhost is a canonical name that has been used since Al Gore invented the internet ;-) Most network-aware programs take the fact that localhost is a synonym for the loopback address for granted. You should undo what you did.

If you want another, more descriptive name for 127.0.0.1 and ::1, just invent a new one, put it in your /etc/hosts file under the definition for localhost and start using it. Leave localhost the way it is!

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct