Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to redirect a host to local machine, in windows you get a hosts file. Is there something like this in Linux?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

C:\Windows\System32\drivers\etc\hosts on windows and /etc/hosts on linux(unix,bsd) are more or less the same thing.

share|improve this answer
tried adding an entry there, and then pinged it - its not pinging local IP, but some internet address with the same name – JL. Aug 6 '09 at 17:55
/etc/host.conf: line 5: bad command `' – JL. Aug 6 '09 at 17:56
The file is /etc/hosts not /etc/hosts.conf – xeon Aug 6 '09 at 17:58
Thanks now it works :) – JL. Aug 6 '09 at 17:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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