Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I was hoping to set my local host in my resolv.conf to hermes. So in affect if I type in hermes:8080 into the browser, I get the localhost:8080

How is this accomplished?

Please and thank you.

share|improve this question
From what I understand reading the answers, you need to replace 'localhosts' in '/etc/hosts' with 'hermes'. Good luck. –  Oxwivi Sep 7 '11 at 15:42

2 Answers 2

You need it in /etc/hosts, not /etc/resolv.conf.

And your host name should already appear in /etc/hosts.

What does it say when you run this from the terminal?

grep '' /etc/hosts

What about:

cat /etc/hostname
share|improve this answer
what do I need to do to get the desired result. it says hermes. to answer your first question. hermes as well for your second question. –  myusuf3 Feb 20 '11 at 20:11

You can add it to /etc/hosts, like this: hermes

( is the same as localhost)

share|improve this answer
That's bad. If you replace the entry, things will break. It should be added using a separate entry hermes, but it should have already been added by NetworkManager, so there is another problem. –  Mikel Feb 20 '11 at 0:12
Adding it won't break anything, because it doesn't overwrite previous links to –  Vallery Feb 20 '11 at 0:26
There is a difference between and You said, which should just be localhost (or localhost.localdomain localhost or similar). –  Mikel Feb 20 '11 at 0:30
If you add a second entry, then some things will work, but reverse lookups (e.g. getent hosts won't return your host name, which could break some things. –  Mikel Feb 20 '11 at 0:31
I've got multiple things going to in my /etc/hosts: –  Vallery Feb 20 '11 at 0:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.