Socket Programming Question:

Download Job Interview Questions and Answers PDF

What is the /etc/hosts File?

Socket Programming Interview Question
Socket Programming Interview Question

Answer:

The correspondence between host names and IP addresses is maintained in a file called hosts in the (top-level) directory /etc. On most systems, any user can read this file. (A word of caution: on many systems, printing this file may be injurious to local paper supply!!)

Entries in this file look like the following:

127.0.0.1 localhost
192.217.44.208 snoopy beagle hound metlife
153.110.34.18 bugs wabbit wascal
153.110.34.19 elmer
153.110.34.20 sam

Note that more than one name may be associated with a given IP address. This file is used when converting from IP address to host name and vice versa.

Download Socket Programming Interview Questions And Answers PDF

Previous QuestionNext Question
What is Network Host Names?How to Selecte a Service Port?