Wednesday, April 21, 2010

Translating from Names to IPs

To store the translation from a machine name to its IP go to /etc/hosts under Ubuntu Linux. You would need to sudo to change the file. Add stuff like:

192.X.X.X Xen1

Doing this will make it easier to ssh, sftp, etc. as you don't need to remember the IP addresses of the machines and more easily memorizable mnemonics can be used instead

For example now you could do:

ssh xen1

and your machine would know where you want to go !