14

What's the equivalent of hosts files in windows ?

I want to add a dns entry so 'sql1' is pointing to localhost.

I tried adding sql1 127.0.0.1 to /etc/resolveconf/resolv.conf.d/base and then sudo service resolveconf restart, but it's not working. A ping to sql still gives me unknown host sql1.

tweetysat
  • 2,187
  • 14
  • 38
  • 75
  • 2
    Could be good to check askubuntu : http://askubuntu.com/questions/130452/how-do-i-add-a-dns-server-via-resolv-conf – Rémi Benoit Oct 29 '13 at 07:56

1 Answers1

28

Edit /etc/hosts

127.0.0.1 localhost sql1
Barmar
  • 741,623
  • 53
  • 500
  • 612