Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need good description/tutorial of /etc/hosts

Status
Not open for further replies.

gr8gonzo

MIS
Feb 6, 2001
21
US
The name says it all. I'm confused as to what /etc/hosts does. What if I don't have a domain name, etc?
 
/etc/hosts file is just a simple easy way to resolve host names to IP addresses

example

#/etc/hsts
127.0.0.1 localhost
192.168.1.1 scab
192.168.10.30 foo foo.bar.com


I can then refer to any of the host names referenced in the /etc/host file.

i.e.
ping scab
telnet foo
ssh foo.bar.com
ping localhost

Its basically an internal host table, /etc/hosts file was created before DNS (bind) However because there are allot of hosts on the internet a more effcient method of host resoloution was needed. Thats were DNS (BIND) comes into the picture.



-Danny






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top