So at Dev8D we had a session on sharing handy hints and tips to save time and effort. The subject of Dropbox came up, so here’s one of my favourite Dropbox hacks.

At home I have about 4 devices on my network. I like to refer to each by hostname rather than IP address (I SSH a lot), but I dont want to have to run my own DNS server.

The solution to this is pretty simple (and very hacky). On one machine, I configured /etc/hosts to map each hostname to their IP address. Once I had it all set up correctly, I moved hosts to my Dropbox folder, and created a symlink in it’s place (so /etc/hosts points to /home/mark/Dropbox/hosts). I then set up the same symlink on my other machines. Now updating the hosts file on one machine will sync the changes to all other machines, giving me hostname to IP address resolution without DNS.