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.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Related posts:

  1. KeePassX-Password Manager for Ubuntu: How-to
  2. Installing latest Nvidia graphic drivers on Ubuntu (jaunty): How-to
  3. Install XAMPP-Linux Apache MySQL and PhP {LAMP} on Ubuntu: How-to
  4. How to get transparent matrix style terminal in Ubuntu (Jaunty jackalope): How-to
  5. Restoring Grub in Ubuntu: How-to