Super User is a question and answer site for computer enthusiasts and power users. 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

I have been searching the Internet for a real nop tutorial on the subject but could not found any direct info. on how to edit these files the proper way.

I have a Debian Internet server that I use to host some personal domains and runs Squid and rTorrent. The server is up and running with no problems. However, I am confused about a few things.

Lets say that I named my server (foo), my domain is ( and my public IP is now:

  1. should /etc/hostname contains:


    tango <----- just the server name
  2. should /etc/hosts contain:       localhost.localdomain   localhost         foo
  3. should /etc/resolf.conf contain (along with the name servers) both:


    or just the first one.

    Are there any other files that I should edit in order to make things right?

  4. last thing, the command:

    returns: (none)

    I believe it should return ( What should I do to correct that?

share|improve this question

migrated from Apr 2 '12 at 22:23

This question came from our site for system and network administrators.

Your shift key appears to be broken. – Chris S Apr 2 '12 at 22:21
This sounds suspiciously like a homework assignment I once had. Anyway, all of these questions can be answered in man pages: resolv.conf(5), hostname(1) and hosts(5) – AdmiralNemo Apr 2 '12 at 23:09

/etc/hostname should have just foo

/etc/hosts looks fine

/etc/resolv.conf should probably be for both, depending on your use case. Note that you named it /etc/resolf.conf and it should be v and not f

I don't know about domainname

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .