Re: uname: Linux ... "unknown"

Miquel van Smoorenburg (miquels@cistron.nl)
3 Feb 1999 02:02:14 +0100


In article <cistron.19990202182701.C12815@anjala.mit.edu>,
Arvind Sankar <arvinds@mit.edu> wrote:
>btw, domainname on my machine returns nothing. where does uname(2) get the
>domain name from?

It doesn't. You can only set and read the hostname.

The "domainname" is something that is only used for the NIS domain, the
DNS domainname is something completely different. However on much
systems where NIS is used they are the same ASCII string for convenience.

On Linux systems, the hostname is usually only set to the hostname.
Eg, just "defiant" instead of "defiant.cistron.nl". The domainname can
then be found by looking up "defiant" through /etc/hosts or DNS.

BSD based systems often set the system hostname to the FQDN, eg
the complete "defiant.cistron.nl" instead of just "defiant". IMHO,
that makes more sense, but both methods seem to work.

Mike.

-- 
Indifference will certainly be the downfall of mankind, but who cares?

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/