Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

My /etc/hostname has:

Previously, it was:

If I do hostame I get But doing hostname -s returns old.

According to the man page:

   -s, --short
          Display the short host name. This is the host name cut at the first dot.

Which is not what I get. I have even rebooted the server.

Any ideas?

share|improve this question

Just happened to me on CentOS 5.7 and found out using strace. Btw what distro is it?

Your /etc/hosts probably still looks like: localhost localhost.localdomain

You should replace the FIRST entry there, which probably still points to the old name.

This might also be tuned by editing /etc/nsswitch.conf and /etc/host.conf, but probably not required.

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.