Mailinglist Archive: opensuse (1714 mails)

< Previous Next >
Re: [opensuse] domainname
  • From: David Haller <dnh@xxxxxxxxxxxx>
  • Date: Fri, 2 Jul 2010 03:47:53 +0200
  • Message-id: <20100702014753.GA8153@xxxxxxxxxxxxxxxxxx>

On Wed, 30 Jun 2010, Lars Müller wrote:
On Wed, Jun 30, 2010 at 09:32:45PM +0200, mattias jonsson wrote:
How to change domainname
^^^^^^^^^^ (emphasis for Lars)

I run opensuse 11.2 without x and no yast

By adjusting the content of /etc/HOSTNAME and calling

service boot.localnet restart


$ cat /etc/HOSTNAME
$ dnsdomainname
$ domainname


What you want to do is edit /etc/hosts. You should have alias1 alias2

(with alias1 = hostname). You can also check with:

$ hostname
$ hostname -d
$ hostname -f

The /etc/hosts contains the corresponding line for that: localhost slarty

(if you don't use the FQDN as the first name after the IP, hostname -f
will report that, not the FQDN. And, some apps will fail doing "what
is right and proper", e.g. as domain-part in Msg-IDs [Ed. note: loud
and explicit cursing elided]).

For IPv6, you'll need matching entries for ::1 (IIRC, I'm not into

Oh, and setup your /etc/nsswitch.conf accordingly with at least:

hosts: files dns

And I got quite a bunch of other stuff in my hosts, e.g.:

I wish one could use wildcards there ;)


PS: Anyone else here read nsswitch.conf as "nameserver service witch",
or something alike, with "witch" at the end anyway, not "switch"?
Influenced by /lib/libnss_* in my case, I think ...

Shouldn't a "programmer's editor" be called a "bugger"? -- Graham Reed
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >