The uname command reports basic information about a computer's software and hardware. Its syntax is
When used without any options, uname reports the name, but not the version number, of the kernel (i.e., the core of the operating system). Thus, on a system running some distribution (i.e., version) of Linux, it will display the word Linux on the monitor screen. The -a (i.e., all) option tells uname to provide the following information: the name of the kernel, network node host name (e.g., localhost.localdomain), kernel version number and release level (e.g., 2.4.20-6), kernel release date, machine hardware name, CPU (central processing unit) type, hardware platform and operating system name (e.g., GNU/Linux). Options are available to allow each of these pieces of information to be reported individually: -s for kernel name (i.e., the default action), -n for network node host name, -r for kernel version number and release level, -v for date of release of the kernel version, -m for machine hardware name, -p for CPU type (not available on some systems), -i for general hardware platform and -o for operating system. These options can be combined to produce any combination of output desired, although the order of the output is the same as that provided by the -a option rather than that in which the options are listed. For example, the following will display the kernel name and version number inclusive of the release level:
The output will be in the same order if the options are transposed, i.e.,
The --help option displays brief documentation for uname, and the --version option provides uname's version number. Created July 13, 2005. Updated June 1, 2006. |