Uname

From Wikipedia, the free encyclopedia

The correct title of this article is uname. The initial letter is shown capitalized due to technical restrictions.

In computer software, uname is a program in Unix operating systems that prints the name, version and other details about the running operating system. 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 UNIX System III.

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.

In GNU systems, uname is included in the "sh-utils" or "coreutils" packages. uname itself is not available as a standalone program.

[edit] Examples

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

Darwin hostname.local. 6.8 Darwin Kernel Version 6.8: Wed Sep 10 
15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC  Power Macintosh powerpc

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

Operating System -s Kernel or System Name -o OS -m Machine -p Processor -i Hardware Platform -v Kernel Version -r Kernel Release
Cray UNICOS 9.0.2.2 sn5176 illegal option CRAY Y-MP illegal option illegal option sin.0 9.0.2.2
Linux (Red Hat), Pentium 4 Linux GNU/Linux i686 i686 i386 #1 Sat Jul 23 07:47 UTC 2005 2.4.21-297-default
Linux (Red Hat, Fedora core 5), Pentium 4 Linux GNU/Linux i686 i686 i386 #1 SMP Tue Mar 28 03:55:15 EST 2006 2.6.16-1.2080_FC5smp
Linux (Fedora Core 6), AMD Thurion64 mobile Linux GNU/Linux i686 athlon i386 #1 SMP Wed Jan 10 19:28:18 EST 2007 2.6.19-1.2895.fc6
Linux (Gentoo), Celeron M Linux GNU/Linux i686 Intel(R) Celeron(R) M processor 1.50GHz unknown #2 PREEMPT Sun May 21 04:37:05 PDT 2006 2.6.16-suspend2-r6
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)
Cygwin (Windows 2000), AMD Athlon CYGWIN_NT-5.0 Cygwin i686 unknown unknown 2006-01-20 13:28 1.5.19(0.150/4/2)
Solaris 9, Ultra 5 SunOS sun4u sparc SUNW,Ultra-5_10
AIX aix6 000931784C00 powerpc 5 1
Mac OS X Darwin illegal option Power Macintosh powerpc illegal option Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC 6.8
Mac OS X (intel) Darwin illegal option i386 i386 illegal option Darwin Kernel Version 8.6.1: Tue Mar 7 16:55:45 PST 2006; root:xnu-792.9.22.obj~1/RELEASE_I386 6.8

[edit] See also

[edit] External links


In other languages