Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The /etc/hosts file defaults your hostname to rather than   localhost   my_machine

I've already found out why. But that was giving me problems testing some web apps, which had hard-coded assumption, that local machine == So I've change my hosts file to   localhost my_machine

Question is:

  • are there reasons for which hack still valid?
  • if so, which software included in 11.04 might have problem with the change I've made?
share|improve this question

Your local machine IS It's the standard IP for the localhost.

Instead, the hostname of your machine resolves to

It should be no problem to change it to anything in the range which is reserved for loopbacks.

As long as nothing listens on you should be safe. To find if there's something listening on

sudo netstat -tunelp | grep
share|improve this answer

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.