lkml.org 
[lkml]   [1999]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: uname: Linux ... "unknown"
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.055 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site