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

link|improve this question

78% accept rate
feedback

1 Answer

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.

link|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 `192.168.1.4 mintbox.com' – 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
feedback

Your Answer

 
or
required, but never shown

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