Uname


uname 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 uname 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. uname itself is not available as a standalone program. The version of uname 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 setname program, used to change the values that uname reports.
The ver command found in operating systems such as DOS, OS/2 and Microsoft Windows is similar to the uname command.

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. Within the bash shell, the environment variable OSTYPE contains a value similar to the value of.
DistributionSystem
POSIX
Operating System Machine
POSIX
Processor Hardware platform OS version
POSIX
OS release
POSIX
Android 4.2.1 on Nexus 4LinuxLinuxarmv7l#1 SMP PREEMPT Thu Nov 8 15:42:02 PST 20123.4.0-perf-ge039dcb
Android 2.3 on Meteorit netbookLinuxLinuxarmv6l
any, coreutils 7.1LinuxLinuxsparc64sparc64UltraSPARC T1
any, coreutils 7.1–8.4LinuxLinuxppc64ppc64PPC 970FX
busybox-w32 1.27 on Windows 10Windows_NTMS/Windowsi68692006.2
busybox-w32 1.27 on Wine 2.0Windows_NTMS/Windowsx86_6437905.2
CentOS 6.5, Pentium SU4100LinuxLinuxi686i686i386#1 SMP Fri Nov 22 00:26:36 UTC 20132.6.32-431.el6.i686
Cray UNICOS 9.0.2.2sn5176CRAY Y-MPsin.09.0.2.2
Cygwin, Pentium 4CYGWIN_NT-5.1Cygwini6862006-01-20 13:281.5.19
Cygwin 1.7, Core i7CYGWIN_NT-6.1Cygwini6862012-07-20 22:551.7.16
Cygwin 1.7, Core i7CYGWIN_NT-6.1-WOW64Cygwini6862012-05-09 10:251.7.15
Cygwin 1.7 64 bit CYGWIN_NT-6.1Cygwinx86_642014-02-09 21:061.7.28
Cygwin 2.2 64 bit CYGWIN_NT-10.0Cygwinx86_642015-08-20 11:422.2.1
DJGPP v2 32 bit MS-DOSi686505
Debian 6.0.5 on Raspberry Pi BLinuxLinuxarmv6lunknown
invalid
#90 Wed Apr 18 18:23:05 BST 2012 / #538 PREEMPT Fri Aug 30 20:42:08 BST 20133.1.9+ / 3.6.11+
Debian on WD MyBookLiveLinuxLinuxppcunknown
invalid
#1 Fri Oct 15 17:13:23 PDT 20102.6.32.11-svn21605
Debian GNU/HurdGNUGNUi686-AT386unknown
illegal option
GNU-Mach 1.3.99-486/Hurd-0.30.3
Debian GNU/kFreeBSD 6.0, AMDGNU/kFreeBSDGNU/kFreeBSDx86_64amd64AMD Sempron Processor 3000+#0 Thu Nov 26 04:22:59 CET 20098.0-1-amd64
DragonFlyBSDDragonFlyi386i386GENERICDragonFly v2.13.0.749.g93fef-DEVELOPMENT #0: …2.13-DEVELOPMENT
DragonFlyBSD 2.7, AMD64DragonFlyx86_64x86_64DragonFly v2.7.3.122.g0ba92-DEVELOPMENT #0: Tue June 8 16:50:35 CEST 20102.7-DEVELOPMENT root@Chance.: /usr/obj/usr/src/sys/X86_64_GENERIC
Fedora 19LinuxLinuxi686i686i386#1 SMP Fri Mar 7 17:22:54 UTC 20143.13.6-100.fc19.i686
FreeBSD 6.1, IntelFreeBSDi386i386FreeBSD 6.1-RELEASE-p15 #1: Sun Apr 15 18:04:51 EDT 20076.1-RELEASE-p15
FreeBSD 9.0, IntelFreeBSDFreeBSDamd64amd64FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC9.0-RELEASE
Gentoo, UltraSparc IIeLinuxLinuxsparc64sun4uTI UltraSparc IIe #1 SMP Wed Nov 10 02:04:26 CET 20102.6.34-gentoo-r12
Haiku R1/Alpha 1, QEMUHaikuHaikuBePCr33109 Sep 12 2009 17:45:451
HP-UXHP-UX9000/712UB.11.11
HP-UX 11i v3HP-UXia64UB.11.31
GNU HurdGNUGNUi686-AT386unknownunknownGNU-Mach 1.8+git20190109-486/Hurd-0.90.9
IBM AIX PS/2 v1.3AIXi38613.0
IBM AIX 5.3AIX'powerpcIBM,8205-E6B53
IBM AIX 7.1AIX'powerpcIBM,7891-73X71
IBM AIX 7.2AIX'powerpcIBM,9009-42A72
IBM i 5.3 with QSHOS400''53
IBM i 6.1 with QSHOS400''61
IBM i 7.1 with QSHOS400''71
Interix 3.5Interixx86Intel_x86_Family6_Model28_Stepping1010.0.7063.06.1
Interix, Subsystem for Unix-based Applications, AMD64 6.1 Interix-genuineintelIntel64_Family_6_Model_26_Stepping_4-10.0.7063.06.1
IRIXIRIXIP22mips
IRIX 6.5.30, Origin 2000IRIX64IP30
IP35
mips072020136.5
Linux Mint 10 "Julia" 64-bitLinuxLinuxx86_64#33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 20102.6.35-22-generic
Linux on Xeon PhiLinuxLinuxk1omk1omk1om#2 SMP Fri Jun 21 13:43:31 EDT 20132.6.38.8-g2593b11
Mac OS X Panther 10.3, PowerBook G4 DarwinPower MacintoshpowerpcDarwin Kernel Version 7.8.0: Wed Dec 22 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC7.8.0
Mac OS X Snow Leopard 10.6, MacBook3,1 Darwini386i386Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I38610.0.0
Mac OS X Lion 10.7.3 build 11D50, MacbookPro7,1 Darwinx86_64i386Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_6411.3.0
OS X Mountain Lion 10.8.3 build 12D78, MacbookPro10,1 Darwinx86_64i386Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_6412.3.0
OS X Mavericks 10.9 build 13A598, MacbookPro5,1 Darwinx86_64i386Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_6413.0.0
OS X Yosemite 10.10 build 14A298i, MacbookPro6,2 Darwinx86_64i386Darwin Kernel Version 14.0.0: Tue Jul 15 23:56:31 PDT 2014; root:xnu-2782.1.43.0.2~1/RELEASE_X86_6414.0.0
OS X El Capitan 10.11 build 15A284, MacBookPro10,1 Darwinx86_64i386Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_6415.0.0
macOS Sierra 10.12 build 16E195, MacBookPro12,1 Darwinx86_64i386Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_6416.5.0
macOS High Sierra 10.13.3 build 17D47, MacBookPro12,1 Darwinx86_64i386Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_6417.4.0
macOS Mojave 10.14.3 build 18D109Darwinx86_64i386Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_6418.2.0
macOS Catalina 10.15.5 build 19F101DarwinDarwinx86_64i386MacBookPro15.1Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_6419.5.0
Manjaro Linux 0.8.11 64 bitLinuxLinuxx86_64#1 SMP PREEMPT Sat Nov 15 10:54:42 UTC 20143.17.3-1-MANJARO
MidnightBSD 1.0, IntelMidnightBSDMidnightBSDamd64amd64MidnightBSD 1.0 #5 r11989M: Sat Aug 11 13:20:45 EDT 2018 root@stargazer.midnightbsd.org:/usr/obj/usr/src/sys/GENERIC1.0
MINIX 3.1.7, x86Minixi686i3861.73
MinGW 32 bit MINGW32_NT-6.1Msysi6862018-11-26 09:222.11.2
MinGW 64 bit MINGW64_NT-6.1Msysx86_642018-11-26 09:222.11.2
MSYS 32 bit MSYS_NT-6.1Msysi6862018-11-26 09:222.11.2
MSYS 64 bit MSYS_NT-6.1Msysx86_642018-11-26 09:222.11.2
NetBSDNetBSDi386i386NetBSD 6.0.1 6.0.1
NonStop OS H06 25NONSTOP_KERNELNSE-TH0625
NonStop OS J06 14NONSTOP_KERNELNSE-ABJ0614
OpenBSD 5.4OpenBSDamd64amd64GENERIC.MP#15.4
openSUSE 10.3, Core2-duo 64-bitLinuxLinuxx86_64x86_64x86_64#1 SMP 2007/09/21 22:29:00 UTC2.6.22.5-31-default
OpenWRT Barrier Breaker r40420 on TL-WR1043NDLinuxLinuxmipsunknown
invalid
#1 Tue Apr 8 06:30:07 UTC 20143.10.34
QNXQNXx86pcx862010/07/09-14:44:03EDT6.5.0
Red Hat Linux, Fedora Core 6, AMD Turion64 mobileLinuxLinuxi686athloni386#1 SMP Wed Jan 10 19:28:18 EST 20072.6.19-1.2895.fc6
ReliantUNIXReliantUNIX-YRM600R4000B20055.45
SINIXSINIX-YRM600R40005.43
Solaris 2.5.1 Intel Platform EditionSunOSSolarisi86pci386i86pcGeneric_103641-425.5.1
Solaris 8SunOSsun4usparcSUNW,UltraAX-i2Generic_117350-505.8
Solaris 9, Sun Fire 280RSunOSsun4usparcSUNW,Sun-Fire-280RGeneric_112233-085.9
Solaris 10, Sun Fire V490SunOSsun4usparcSUNW,Sun-Fire-V490Generic_142900-135.10
Solaris 11.1, Sun Fire X4540SunOSi86pci386i86pc11.15.11
OpenIndianaSunOSi86pci386i86pcoi_151a85.11
OpenIndiana Hipster 2018.04SunOSSolarisi86pci386i86pcillumos-47b8d4b8845.11
SmartOSSunOSi86pci386i86pcjoyent_20150403T203811Z5.11
OmniOSSunOSi86pci386i86pcomnios-a7084245.11
Tru64OSF1alphaalphainvalid2650V5.1
Ubuntu 11.04LinuxLinuxx86_64x86_64x86_64#46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 20112.6.38-10-generic
Ubuntu 12.0.4 on Pandaboard ESLinuxLinuxarmv7larmv7larmv7l#33-Ubuntu SMP PREEMPT Sat Jan 26 00:46:04 UTC 20133.2.0-1425-omap4
UltrixULTRIXVAX04.5
Unity LinuxLinuxLinuxi686Intel Core i5-2520M CPU @ 2.50 GHzunknown
invalid
#1 SMP Fri Oct 1 16:46:58 UTC 20102.6.35.7-unity1
UnxUtils 2007 32 bit WindowsNTx8660
OpenServer 5.0.6SCO_SV'i386i3865.0.63.2
System VSCO_SVi386i3866.0.05
UnixWare 7.1.4UnixWarei386x86at-i hardware serial/license number,.e.g. 1AB000123 or NUL000000; -M is illegal option7.1.45
UWIN, Intel Core i5UWIN-W7UWINi686-64x6464/642012-06-265.0/6.1
SYS$UNIX:SH on OpenVMS on VAX emulatorIS/WBvax-6340std5.0
z/OS USSOS/3902097-i/-M: unknown option; -I: z/OS0322.00
Windows Subsystem for Linux, Ubuntu 18.04LinuxGNU/Linuxx86_64x86_64x86_64#476-Microsoft Fri Nov 01 16:53:00 PST 20194.4.0-18362-Microsoft

Footnotes