| RSS

How to manage hosts in Ubuntu

July 30th, 2009 | Comments | Posted in How-to, Linux, 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.

hosts1

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:

hosts

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.


Leave a Reply 1406 views, 2 so far today |

Random Posts

blog comments powered by Disqus
Cornish fauna - Horse fly Tabanus sp. #3There's only one thing stops a hoverfly in mid flight.. Male hoverfly Syritta pipiensSaale BridgeLes Invalides - HDRsanta eufemia de cozuelos - HDRStreet ArtmiraCloud KillerMolino HDRTours Société Générale By Night | HDR