5
0
Uname utility in *nix retrieves wonderful meta information about the machine. Where is this information stored?
5
0
Uname utility in *nix retrieves wonderful meta information about the machine. Where is this information stored?
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.
3
Part of the utsname information is also accessible via
/proc/sys/kernel/{ostype, hostname, osrelease, version, domainname}
see uname man page
0
The kernel, mostly, where at least the hostname is usually read from /etc/hostname
or a similar file during bootup.
-2
The uname command retrieved informations are stored in etc/hostname that hostname file contains your machine name.
1No. It contains only the hostname, no kernel related information. – Michael – 2012-11-24T10:22:51.967
1https://github.com/torvalds/linux/blob/v4.4/arch/x86/entry/syscalls/syscall_64.tbl#L72 – Ciro Santilli 新疆改造中心法轮功六四事件 – 2016-05-10T18:26:02.837