Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 need ubuntu to use a certain domain name to point to a localhost address temporarily. How could I confgure for that ?

share|improve this question

What are we talking about here? A single host, a network, a dns server serving your domain?

I'm gonna go with single host:

echo '' | sudo tee -a /etc/hosts

If you are in fact in a network then please add more information to your question.

share|improve this answer
thanks I tried modifying the /etc/hosts file but it didn't had any effects even after restart.. – user01 Feb 4 '14 at 19:45
You may also need to ensure that the "hosts: " line in "/etc/nsswitch.conf" lists "files" before "dns". For example: hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4 – mivk Jan 1 '15 at 10:50

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.