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

In my home network, I would like to be able to set up hostnames on my network, rather than accessing computers by IP:


webserver.mynetwork = a Linux VM running on my computer
mylaptop.mynetwork = My laptop (Linux)
mylaptopwin.mynetwork = My laptop while booted into Windows (Vista)
nas.mynetwork = My NAS drive
laptop2.mynetwork = A second laptop on my network (Windows XP used for gaming etc.)
brotherlaptop.mynetwork = My brother's laptop. (Vista)

How would I go about doing this? All of these have a static IP address.

I know I would be able to do this by editing the hosts file on all these computers, but is their a neater solution? I've looked through my router's control panel, and it doesn't seem to have anything relevant. (Netgear WPN111). I can't rely on any of these to be on at any given time.

share|improve this question
I don't understand. I haven't done anything special and I can access all of my machines on my network using their name. Most are windows, but also a mac, or does enabling windows file sharing there has something to do with it? And if so, isn't that also possible in Linux? I know I never fiddled with any hosts file, and I definitely don't have a DNS server. – fretje Sep 28 '09 at 17:56
fretje: He said he can't rely on any of those computers to be on at any given time. That's why the "built in" hostname resolution you're referring to will not work for him. – OverloadUT Sep 28 '09 at 18:32
@OverloadUT: I still don't understand. When the computer to reach isn't on, any hostname resolution, built-in or not, won't work then, isn't it? – fretje Sep 30 '09 at 10:04
up vote 10 down vote accepted

Hosts file would be the easiest solution.

The only other way would be if you control your own DNS server, in which case you will just need to insert a few entries. You may be able to set up a DNS server if you have another pc on 24/7, but if not, I would say hosts file is the way to go.

share|improve this answer
That's what I was gonna say, the hosts solution is pretty easy..... – in.spite Sep 28 '09 at 17:27
+1 - For ~5 hosts, a personal DNS server is some serious overkill. – romandas Sep 28 '09 at 17:42
the hosts file "solution" is everything but easy. Maintaining multiples files accross machines is a PITA, and very error-prone. – philipyassin Sep 17 '13 at 10:28

According to the manual on Wikibooks, you can accomplish this using the Tomato firmware. Knowing Tomato, it should be very easy to set up.

The Tomato firmware is a third-party open source firmware replacement for certain types of routers. It's very powerful, fairly user friendly, and has a lot of great little features. It's very easy to install.

All you need is one of the supported routers, which will set you back no more than $60.

share|improve this answer

If the machines on you LAN run a modern operating system, then you can access them with


Don't forget the .local suffix.

To get the name from the IP, use

avahi-resolve-address IP
share|improve this answer

You must log in to answer this question.

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