Documentation
¶
Overview ¶
Package uname implements the uname builtin command.
uname — print system information
Usage: uname [-asnrvm] [--help]
Print certain system information. With no flags, same as -s.
Reads system information from /proc/sys/kernel/ pseudo-files via the ProcProvider. The proc path is configurable via the --proc-path CLI flag or interp.ProcPath() API option (e.g., /host/proc for containers).
Flags:
-s Print the kernel name (default when no flags given) -n Print the network node hostname -r Print the kernel release -v Print the kernel version -m Print the machine hardware name -a Print all of the above, in the order shown -h, --help Display help and exit
Data sources (relative to proc path):
-s sys/kernel/ostype -n sys/kernel/hostname -r sys/kernel/osrelease -v sys/kernel/version -m sys/kernel/arch
Exit codes:
0 Success — requested information was written. 1 Error — unsupported platform, missing proc file, or invalid flag.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = builtins.Command{
Name: "uname",
Description: "print system information",
MakeFlags: makeFlags,
}
Cmd is the uname builtin command descriptor.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.