Where is the information retreived by "uname" stored?

5

0

Uname utility in *nix retrieves wonderful meta information about the machine. Where is this information stored?

kunj2aaan

Posted 2012-11-23T19:29:55.783

Reputation: 171

Answers

2

The uname command is actually a front end for a system call that does the same thing. The kernel pretty much knows what it is. You can also see this information on, for example /proc/sysinfo.

Journeyman Geek

Posted 2012-11-23T19:29:55.783

Reputation: 119 122

1https://github.com/torvalds/linux/blob/v4.4/arch/x86/entry/syscalls/syscall_64.tbl#L72 – Ciro Santilli 新疆改造中心法轮功六四事件 – 2016-05-10T18:26:02.837

3

Part of the utsname information is also accessible via

/proc/sys/kernel/{ostype, hostname, osrelease, version, domainname}

see uname man page

usrflo

Posted 2012-11-23T19:29:55.783

Reputation: 31

0

The kernel, mostly, where at least the hostname is usually read from /etc/hostname or a similar file during bootup.

Claudius

Posted 2012-11-23T19:29:55.783

Reputation: 6 330

-2

The uname command retrieved informations are stored in etc/hostname that hostname file contains your machine name.

reegan vijay

Posted 2012-11-23T19:29:55.783

Reputation: 1

1No. It contains only the hostname, no kernel related information. – Michael – 2012-11-24T10:22:51.967