Add static dns entry

What is equivalent to hosts files in windows?

I want to add a dns entry, so 'sql1' points 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 does not work. Ping on sql still gives me an unknown sql1 host.

+6
source share
1 answer

Change /etc/hosts

 127.0.0.1 localhost sql1 
+16
source

Source: https://habr.com/ru/post/956925/


All Articles