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

I've got a server that is currently running as servername, but I need it to be (the IP already resolves to, and I currently have:

in /etc/hosts. What else do I need to do to get the server set up with the IP correctly?

This is the first time I've done anything like this - I can be more specific if needed.

If this is the wrong place to be posting this - please point me in the right direction.

share|improve this question
Does your /etc/hosts really have the IP as, or is that something that you are using as a placeholder? What is the output of the hostname command. – Kirk Jun 14 '11 at 4:32 is a placeholder. servername is the output of hostname. – U. Hudson Jun 14 '11 at 4:34
So is the problem that you are trying to solve that doesn't resolve from an additional host? or that the FQDN doesn't resolve from the server itself? Or is it more basic than that? Can you provide the output from a command that is problematic (other than hostname)? – Kirk Jun 14 '11 at 4:37
the IP resolves to, however hostname lists servername, so it appears the server doesn't know it's real name (if that's the way to put it). This seems to be problematic for things such as running a mailer daemon. – U. Hudson Jun 14 '11 at 4:41
So if you ping from the server itself, it responds appropriately? None of my mail servers show their FQDN at the hostname command, or at the shell prompt. However, they all know what their FQDN is, and are able to reach it appropriately. Which mail server are you looking at? – Kirk Jun 14 '11 at 4:56

If you want to be able to go to another computer and type ssh or point a web-browser at, you should find your local DNS server (if any) and add the entry there to the DNS configuration files. If you don't have a local DNS server then you need to add the entry to every computers hosts file.

On the Ubuntu server you can add the domain to /etc/resolv.conf but there's probably a handy GUI configuration tool for doing this.

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.