[Techtalk] uname -a

Judy Hayes silvertrinity at earthlink.net
Wed May 8 10:19:37 EST 2002


I am on rhat 7.2  2.4.18-smp  still trying to find the location... looking in etc, everything looks right, how frustrating!  I will look in boot again.  I might have missed something

On Wed, 8 May 2002 13:18:37 +1000 (GMT+1000) Carlo Hamalainen <ch at uq.net.au> wrote:


Hi everyone,

On Tue, 7 May 2002, Jeff Dike wrote:
> silvertrinity at earthlink.net said:
> > Question, when issuing the uname -a command where does it pull the
> > information from?
>
> ~ 1027: strace uname -a
> 	...
> uname({sys="Linux", node="ccure.karaya.com", ...}) = 0
> 	...

That's, uh, not too helpful.

>From what I can find out, this actually means that there's a system call
"uname" which returns a bunch of things that you see when you run the
uname -a command (see "man 2 uname"). That man page in particular has
this (a C structure for those not familiar with C):

          struct utsname {
                      char sysname[SYS_NMLN];
                      char nodename[SYS_NMLN];
                      char release[SYS_NMLN];
                      char version[SYS_NMLN];
                      char machine[SYS_NMLN];
          #ifdef _GNU_SOURCE
                      char domainname[SYS_NMLN];
          #endif
          };

So the uname command just calls this and prints the result...

I suspect that the link between the config files (/etc and /boot) would be
a bit trickier and depends on the specific distribution. For example on
older redhat systems, /etc/hostname was what appeared in uname -a, but now
it seems to be buried in /etc/sysconfig/network or something.

[That caused me some grief when setting /etc/hostname as per the man page
and having no effect!]

I would suggest looking more at /etc and /boot - not much else that can be
done.

-- Carlo



_______________________________________________
Techtalk mailing list
Techtalk at linuxchix.org
http://mailman.linuxchix.org/mailman/listinfo/techtalk



More information about the Techtalk mailing list