I would like to setup Ubuntu One to sync a hosts file in my home directory between my machines. Ideally I would setup all my local web development URLs there and it would just sync between devices. But I'm wondering if it's possible for me to setup /etc/hosts so that it includes a file from my user's home directory.
Asked
Active
Viewed 8,302 times
8
Ben
- 1,056
1 Answers
5
But I'm wondering if it's possible for me to setup /etc/hosts so that it includes a file from my user's home directory.
The /etc/hosts file is for mapping hostnames to IP addresses before DNS can be referenced. So the answer is no.
I would like to setup Ubuntu One to sync a hosts file in my home directory between my machines.
Would a hard link in your directory to /etc/hosts not accomplish that?
Something like this (where shared-directory will be your synch folder):
cd ~/shared-directory/
ln -i /etc/hosts hosts
The only difference in approach is that you then share 1 of your actual host files with all the other systems. And not a copy in your home directory.