Mailinglist Archive: opensuse (958 mails)

< Previous Next >
Re: [opensuse] Where to set the domain name? - Leap 15.1 beta
On 07/05/2019 15.56, Per Jessen wrote:
James Knott wrote:

On 05/07/2019 02:43 AM, Per Jessen wrote:
Well, not really.
I added the following line to /etc/hosts on my leap151 test machine:

2001:db8:4f8:a0:1312::1 jamesknott

Then I tried 'ssh jamesknott' -

I thought the purpose of DNS was to eliminate the need for updating
the hosts file. 

Or - the purpose of /etc/hosts is to enable name resolution when you
have no DNS ?

Prior to DNS, someone had to maintain a hosts file
that was distributed to others and used to replace the old hosts file.
Do you really want to go back to the dark ages?

I was suggesting no such thing - however, that is the situation for some

Also, here's some info from my hosts file:

"# hosts         This file describes a number of hostname-to-address
#mappings for the TCP/IP subsystem.  It is mostly
#used at boot time, when no name servers are running.
#On small systems, this file can be used instead of a
#"named" name server."

This indicates the hosts file is not normally used, once a computer
has finished booting. 

The resolver uses the hosts file if directed to do so, via

And if you have dnsmasq running, it uses the /etc/hosts file for config.

Cheers / Saludos,

Carlos E. R.

(from oS Leap 15.0 x86_64 (Minas Tirith))

< Previous Next >
This Thread
Follow Ups