Making Linux Simple!
How to manage hosts in Ubuntu
This one is a quick post on how to manage hosts in Ubuntu. The post is an out come of associating a specific host name to a particular IP address. For example on my college network, we have an internal host namely “exchange1″ which should resolve to the mail service address of my campus mail server. However, because Ubuntu doesn’t know what IP it should resolve “exchange” to I get the following error.

How do we let Ubuntu know that a particular host in this case”exchange1″ should resolve to a specific IP (in this case 15.101.20.1)
1. Drop down to the terminal by hitting ALT+F2 and by typing “gnome-terminal”.

2. At the terminal type the following command
sudo gedit /etc/hosts
3. The hosts file will open in the editor. Add the hostname and corresponding IP address. It should look something like this:

4. Save the file and exit. Now when I type in exchange1 in firefox address bar I am resolved to my campus mail service.
Notice that I am telling to resolve exchange1 to 150.101.20.1 . Accordingly you can setup your own host name resolutions.

Related posts:
| Print article | This entry was posted by Vivek on July 30, 2009 at 11:18 am, and is filed under How-to, Linux, Ubuntu. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
No trackbacks yet.
Comments are closed.










about 5 months ago
Thanks! gotta try this