Uname

uname

uname

Standard UNIX utility that prints name and other details about the machine


uname (short for unix name) is a computer program in Unix and Unix-like computer operating systems that prints the name, version and other details about the current machine and the operating system running on it.

Quick Facts Developer(s), Operating system ...

History

The uname system call and command appeared for the first time in PWB/UNIX. Both are specified by POSIX.[1][2] The GNU version of uname is included in the "sh-utils" or "coreutils" packages. uname itself is not available as a standalone program. The version of uname bundled in GNU coreutils was written by David MacKenzie.[3] The command is available as a separate package for Microsoft Windows as part of the GnuWin32 project[4] and the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.[5]

  • Some Unix variants, such as AT&T UNIX System V Release 3.0, include the related setname program, used to change the values that uname reports.
  • The bash shell provides the special variables OSTYPE and HOSTTYPE whose values are similar to those of uname -o and uname -m respectively.

Examples

On a system running Darwin, the output from running uname with the -a command-line argument might look like the text below:

$ uname -a
Darwin Roadrunner.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386

The following table contains examples from various versions of uname on various platforms.[6]

More information Distribution, System (or kernel) (-s) POSIX ...

See also


Footnotes

  1. uname. The Open Group Base Specifications Issue 7/IEEE Std 1003.1, 2013 Edition. Specifies the command.
  2. uname. The Open Group Base Specifications Issue 7/IEEE Std 1003.1, 2013 Edition. Specifies the function/system call.
  3. uname(1)  Linux User Manual – User Commands
  4. These are merely meant to broadly represent common systems; actual output may vary depending on hardware type, OS version, and which software patches have been installed.

Share this article:

This article uses material from the Wikipedia article Uname, and is written by contributors. Text is available under a CC BY-SA 4.0 International License; additional terms may apply. Images, videos and audio are available under their respective licenses.