Windows & Linux Host File

Host file is used in the system when there is a need to resolve a hostname without the use of a DNS server. This file does not have an extension and it is stored in the local machine. Location for this file is dependent on the operating system and it is editable using the standard editor such as notepad & vi.

Question: When do you need to use host name?

Answer: It is when you have an IP address as 192.168.1.4 and would like to include a name instead. For example including192.168.1.4 to http://www.kishurweb.com.

Windows Location (Windows XP):

Path : C:\WINDOWS\system32\drivers\etc

Filename : hosts

Linux Location

Path: /etc

Filename : hosts

Sample data shown in a host file:

127.0.0.1        kishur-desktop
10.37.24.11    kishur.info.com
192.168.1.4    http://www.kishurtest.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s