pag install dnsmasq, but before that i disable sa nimo siya sa NetworkManager kay since gnome 3.2 included na ang core dnsmasq... pwede nimo i filter that everything has .dev will resolved to 127.0.0.1 mao ni ako usual setup sa ako workstation, para mas dali palit nalang router nga naa nay dnsmasq nga nka install i remember naa to sa CDRKing... this is also called DNS Forwarded on some router... for headless setup diretso nalang sa dnsmasq
ive tried this on centos/debian (testing/sid/stable), ubuntu, arch, crunchbang same ra...
all you need to do is set dnsmasq as default dns resolver and listen to 127.0.0.1
since then i never touch my hostfile... and also you also set a dynamic virtualhost, pwede ni siya sa apache, however mas flexible ang nginx.... i recommend nginx since i used it with web and python...