my-server
← Wiki

Uname

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.

History

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

Related and similar commands

  • Some Unix variants, such as AT&T UNIX System V Release 3.0, include the related <code>setname</code> program, used to change the values that uname reports.
  • The <code>ver</code> command found in operating systems such as DOS, OS/2 and Microsoft Windows is similar to the <code>uname</code> command.
  • The bash shell provides the special variables <code>OSTYPE</code> and <code>HOSTTYPE</code> whose values are similar to those of <code>uname -o</code> and <code>uname -m</code> respectively.

Examples

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

The following table contains examples from various versions of <code>uname</code> on various platforms.

See also

Footnotes

External links