Host rule Localhost can we use localhost dev without change etc/hosts?

can anyone explain to me?