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

This question already has an answer here:

I have several Ubuntu computers connected (with wires) by Linksys E1000. Currently, I edit /etc/hosts on each machine to map the hostnames of all the machines and their corresponding IP addresses so that I can access each computer by hostname. But this requires editing of each /etc/hosts files.

I'm wondering if there is a way to somehow setup the network in a way that I don't have to edit all the /etc/hosts files whenever I add a new machine to the network. Thanks.

share|improve this question

marked as duplicate by grawity, Synetech, Andrew Lambert, Kevin Panko, AthomSfere Dec 22 '13 at 17:52

This question was marked as an exact duplicate of an existing question.

@grawity, your answers on… may not be all applicable to my question. Would you please let me which of the solutions you mentioned (mDNS, NetBIOS, DNS, free DNS subdomains) are relevant to my questions? – user1424739 Sep 3 '13 at 21:41
The first three (mDNS preferred). – grawity Sep 3 '13 at 22:04

a - Configure one of your computers to act as a DNS forwarder and use its hosts file as the master b - Set up your clients to use the router as the DNS server and set some static DNS entries in the router (only valid if the router allows static DNS entries). You could use a Microtik router in between your LAN and your gateway for this, its less than 40 USD and has lots of features. c - Replicate the hosts file periodically between computers by using the cron daemon by means of scp or rsync d - Setup a full DNS server at one of the computers.

share|improve this answer

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