uname

From Wikipedia, the free encyclopedia

In computer software, uname (stands for Unix Name) is a program in Unix operating systems that prints the name, version and other details about the current machine and the operating system running on it. It is useful for building software from source, when certain parameters depend on the host operating system. The uname system call and command appeared for the first time in PWB/UNIX.

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 GNU version of uname is included in the "sh-utils" or "coreutils" packages. uname itself is not available as a standalone program.

The ver command found in operating systems such as DOS, OS/2 and Microsoft Windows is similar to the uname command.

[edit] Examples

On a system running Darwin the output from running uname with the -a option might look like the text below:

Darwin hostname 9.2.0 Darwin Kernel Version 9.2.0: Tue Feb  5 16:13:22 PST 2008; root:xnu-1228.3.13~1/RELEASE_I386 i386

The following table contains examples from various versions of uname on various platforms. 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.

Operating System -s OS or Kernel Name -o OS Name -m Machine -p Processor -i or -M Hardware Platform -v OS or Kernel Version -r OS or Kernel Release
Cygwin (Windows XP), Pentium 4 CYGWIN_NT-5.1 Cygwin i686 unknown unknown 2006-01-20 13:28 1.5.19(0.150/4/2)
MinGW/MSYS (Windows XP), AMD XP MINGW32_NT-5.1 illegal option i686 unknown illegal option 2004-03-15 07:17 1.0.10(0.46/3/2)
FreeBSD 6.1, Intel FreeBSD illegal option i386 i386 [filename of kernel conf file] FreeBSD 6.1-RELEASE-p15 #1: Sun Apr 15 18:04:51 EDT 2007 6.1-RELEASE-p15
AIX, IBM System P 570 AIX illegal option 000931784C00 powerpc IBM,9117-MMA 5 1
Cray UNICOS 9.0.2.2 sn5176 illegal option CRAY Y-MP illegal option illegal option sin.0 9.0.2.2
HP-UX 11i v1, HP D320 HP-UX illegal option 9000/803 illegal option 2008500218 U B.11.11
IRIX 6.5.30, Octane2 IRIX64 illegal option IP30 mips illegal option 07202013 6.5
Solaris 9, Sun Fire 280R SunOS illegal option sun4u sparc SUNW,Sun-Fire-280R Generic_112233-08 5.9
Debian Ubuntu Linux, Intel Dual CPU E2160 Linux GNU/Linux i686 unknown unknown #1 SMP Tue Feb 12 07:42:25 UTC 2008 2.6.22-14-generic
Red Hat Linux, Fedora Core 6, AMD Turion64 mobile Linux GNU/Linux i686 athlon i386 #1 SMP Wed Jan 10 19:28:18 EST 2007 2.6.19-1.2895.fc6
openSUSE 10.3, Core2-duo 64-bit Linux GNU/Linux x86_64 x86_64 x86_64 #1 SMP 2007/09/21 22:29:00 UTC 2.6.22.5-31-default
Mac OS X 10.4.11, Intel Core 2 Duo Darwin illegal option i386 i386 illegal option Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 8.11.1
Mac OS X 10.5.1, Intel Core 2 Duo Darwin illegal option i386 i386 illegal option Darwin Kernel Version 9.1.0: Wed Oct 31 17:46:22 PDT 2007; root:xnu-1228.0.2~1/RELEASE_I386 9.1.0
Mac OS X 10.5.2, PowerPC Darwin illegal option Power Macintosh powerpc illegal option Darwin Kernel Version 9.2.0: Tue Feb 5 16:15:19 PST 2008; root:xnu-1228.3.13~1/RELEASE_PPC 9.2.0

[edit] See also

[edit] External links