Free File Hosting and online file storage expert. File Hosting, online file storage, Music File Hosting, Video File Hosting



The hosts file is a computer file used in an operating system to map hostnames to IP addresses. The hosts file is a plain-text file and is conventionally named hosts.
Contents
[hide]

1 Purpose
2 File content
3 Location in the file system
4 History
5 Extended applications
6 Security issues
7 See also
8 References
9 External links

[edit] Purpose

The hosts file is one of several system facilities to assist in addressing network nodes in a computer network. It is a common part in an operating system's Internet Protocol (IP) implementation, and serves the function of translating human-friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.

In some operating systems, the hosts file content is used preferentially over other methods, such as the Domain Name System (DNS), but many systems implement name service switches (e.g., nsswitch.conf) to provide customization. Unlike the DNS, the hosts file is under the direct control of the local computer's administrator.[1]
[edit] File content

The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more hostnames. Each field is separated by white space (blanks or tabulation characters). Comment lines may be included; they are indicated by a hash character (#) in the first position of such lines. Entirely blank lines in the file are ignored. For example, a typical hosts file may contain the following:

# This is an example of the hosts file
127.0.0.1 localhost loopback
::1 localhost

This example only contains entries for the loopback addresses of the system and their hostnames, a typical default content of the hosts file. The example illustrates that an IP address may have multiple hostnames, and that a hostname may be mapped to several IP addresses.
[edit] Location in the file system

The location of the hosts file in the file system hierarchy of operating systems varies. The hosts file is usually named "hosts" without any .txt extension.

الأربعاء، 28 ديسمبر 2011 Leave a comment