Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to put some entry in some file such as

So that whenever a linux user types the domain name on his browser then the website hosted on the localhost comes. Can somebody tell me how to do this.

share|improve this question

closed as off topic by GregD, Ward, Iain, Bart De Vos, Maxwell Sep 22 '11 at 7:50

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

What is answer?

linux: echo '' >> /etc/hosts


put line into windows/system32/drivers/etc/hosts

share|improve this answer
if i am using proxy server to access my internet then this trick doesnot works since it redirects all traffic to proxy server. Can you please tell me how to do in that scenario. – pradeepchhetri Sep 22 '11 at 5:52
ya thanks a lot .. i got that also .. what i did that in the browser i used the "no proxy for" option and put there Thanks – pradeepchhetri Sep 22 '11 at 5:55

The file you're after is /etc/hosts

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.