[opensuse] Re: host file question
Ken Schneider - openSUSE wrote:
On 06/11/12 16:36, Joachim Schrod pecked at the keyboard and wrote:
Also the entry needs to be in the format of:
<IP address> FQDM ALIAS
Ahem, technically no. You probably know that, but I want to mention it for the archives. The format is
IP_address name1 [name2 ...]
I beg to differ:
pc1:~ # cat /etc/hosts # # 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. # Syntax: # # IP-Address Full-Qualified-Hostname Short-Hostname #
The openSUSE comment in /etc/hosts is a recommendation what to put there. It is not a technical specification. To get the fine print, please read the manual page: man hosts This manual page describes the format of the /etc/hosts file. This file is a simple text file that associates IP addresses with hostnames, one line per IP address. For each host a single line should be present with the following information: IP_address canonical_hostname [aliases...] Nowhere in the hosts man page is the term domain even named. Furthermore, you can try it out. Add a line 192.168.1.111 xmpl xmple.foo.baz xmpl.example.com www.google.com to your hosts file (with a fitting IP address, of course). Then you'll be able to ping all three names. Of course, you won't be able to use Google any more... ;-) Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (1)
-
Joachim Schrod