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 in MS-DOS, OS/2, and Windows is similar to <code>uname</code>.
- 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:
<syntaxhighlight lang="console">
$ 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
</syntaxhighlight>
The following table contains examples from various versions of <code>uname</code> on various platforms.
{| class="wikitable sortable sort-under"
! Distribution
! System (or kernel) <br/>POSIX
! Operating System (or distribution)
! Machine <br/>POSIX
! Processor
! Hardware platform
! OS (kernel) version <br/>POSIX
! OS (kernel) release <br/>POSIX
|-
| Android 4.2.1 on Nexus 4
| Linux
| GNU/Linux
| armv7l
|
|
| #1 SMP PREEMPT Thu Nov 8 15:42:02 PST 2012
| 3.4.0-perf-ge039dcb
|-
| Android 2.3 on Meteorit netbook
| Linux
| GNU/Linux
| armv6l
|
|
|
|
|-
| any, coreutils 7.1
| Linux
| GNU/Linux
| sparc64
| sparc64
| UltraSPARC T1 (Niagara)
| (all)
| (all)
|-
| any, coreutils 7.1–8.4
| Linux
| GNU/Linux
| ppc64
| ppc64
| PPC 970FX (XServe G5)
| (all)
| (all)
|-
| Arch Linux
| Linux
| GNU/Linux
| x86_64
|
|
| #1 SMP PREEMPT_DYNAMIC Tue, 04 Oct 2022 19:16:52 +0000
| 6.0.0-arch1-1
|-
|-
|A/UX 3.1
|A/UX
|
|mc68030
|
|
|SVR2
|3.1
|-
| busybox-w32 1.27 (32-bit) on Windows 10
| Windows_NT
| MS/Windows
| i686
|
|
| 9200
| 6.2
|-
| busybox-w32 1.27 (64-bit) on Wine 2.0
| Windows_NT
| MS/Windows
| x86_64
|
|
| 3790
| 5.2
|-
| CentOS 6.5, Pentium SU4100
| Linux
| GNU/Linux
| i686
| i686
| i386
| #1 SMP Fri Nov 22 00:26:36 UTC 2013
| 2.6.32-431.el6.i686
|-
| Cray UNICOS 9.0.2.2
| sn5176
|
| CRAY Y-MP
|
|
| sin.0
| 9.0.2.2
|-
| Cygwin (Windows XP), Pentium 4
| CYGWIN_NT-5.1
| Cygwin
| i686
|
|
| 2006-01-20 13:28
| 1.5.19(0.150/4/2)
|-
| Cygwin 1.7 (Windows 7 32-bit), Core i7
| CYGWIN_NT-6.1
| Cygwin
| i686
|
|
| 2012-07-20 22:55
| 1.7.16(0.262/5/3)
|-
| Cygwin 1.7 (Windows 7 64-bit), Core i7
| CYGWIN_NT-6.1-WOW64
| Cygwin
| i686
|
|
| 2012-05-09 10:25
| 1.7.15(0.260/5/3)
|-
| Cygwin 1.7 64 bit (Windows 7 64-bit)
| CYGWIN_NT-6.1
| Cygwin
| x86_64
|
|
| 2014-02-09 21:06
| 1.7.28(0.271/5/3)
|-
|Cygwin 2.2 64 bit (Windows 10 64-bit)
|CYGWIN_NT-10.0
|Cygwin
|x86_64
|
|
|2015-08-20 11:42
|2.2.1(0.289/5/3)
|-
| DJGPP v2 32 bit (Windows Server 2008)
| MS-DOS
|
| i686
|
|
| 50
| 5
|-
| Debian 6.0.5 on Raspberry Pi B
| Linux
| GNU/Linux
| armv6l
|
|
;:unknown
;:invalid
| #90 Wed Apr 18 18:23:05 BST 2012 / #538 PREEMPT Fri Aug 30 20:42:08 BST 2013
| 3.1.9+ / 3.6.11+
|-
| Debian on WD MyBookLive
| Linux
| GNU/Linux
| ppc
|
|
;:unknown
;:invalid
| #1 Fri Oct 15 17:13:23 PDT 2010
| 2.6.32.11-svn21605
|-
| Debian GNU/Hurd
| GNU
| GNU
| i686-AT386
|
|
;:unknown
;:illegal option
| GNU-Mach 1.3.99-486/Hurd-0.3
| 0.3
|-
| Debian GNU/kFreeBSD 6.0, AMD
| GNU/kFreeBSD
| GNU/kFreeBSD
| x86_64
| amd64
| AMD Sempron Processor 3000+
| #0 Thu Nov 26 04:22:59 CET 2009
| 8.0-1-amd64
|-
| DragonFlyBSD
| DragonFly
|
| i386
| i386
| GENERIC
| DragonFly v2.13.0.749.g93fef-DEVELOPMENT #0: …
| 2.13-DEVELOPMENT
|-
| DragonFlyBSD 2.7, AMD64
| DragonFly
|
| x86_64
| x86_64
| [filename of kernel conf file]
| DragonFly v2.7.3.122.g0ba92-DEVELOPMENT #0: Tue June 8 16:50:35 CEST 2010
| 2.7-DEVELOPMENT root@Chance.: /usr/obj/usr/src/sys/X86_64_GENERIC
|-
| Fedora 19
| Linux
| GNU/Linux
| i686
| i686
| i386
| #1 SMP Fri Mar 7 17:22:54 UTC 2014
| 3.13.6-100.fc19.i686
|-
| FreeBSD 6.1, Intel
| FreeBSD
|
| i386
| i386
| [kernel name from kernel conf file. i.e.: GENERIC]
| FreeBSD 6.1-RELEASE-p15 #1: Sun Apr 15 18:04:51 EDT 2007
| 6.1-RELEASE-p15
|-
| FreeBSD 9.0, Intel
| FreeBSD
| FreeBSD
| amd64
| amd64
| [kernel name from kernel conf file. i.e.: GENERIC]
| FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
| 9.0-RELEASE
|-
| Gentoo, UltraSparc IIe
| Linux
| GNU/Linux
| sparc64
| sun4u
| TI UltraSparc IIe (Hummingbird)
| #1 SMP Wed Nov 10 02:04:26 CET 2010
| 2.6.34-gentoo-r12
|-
| Haiku R1/Alpha 1, QEMU
| Haiku
| Haiku
| BePC
|
|
| r33109 Sep 12 2009 17:45:45
| 1
|-
| HP-UX
| HP-UX
|
| 9000/712
|
| [Unique machine ID number or node name if cannot be determined.]
| U
| B.11.11
|-
| HP-UX 11i v3
| HP-UX
|
| ia64
|
| [Unique machine ID number or node name if cannot be determined.]
| U
| B.11.31
|-
| GNU Hurd
| GNU
| GNU
| i686-AT386
|
|
| GNU-Mach 1.8+git20190109-486/Hurd-0.9
| 0.9
|-
| IBM AIX PS/2 v1.3
| AIX
|
| i386
|
|
| 1
| 3.0
|-
| IBM AIX 5.3
| AIX
|
|(serial number of machine)
| powerpc
| IBM,8205-E6B
| 5
| 3
|-
| IBM AIX 7.1
| AIX
|
|(serial number of machine)
| powerpc
| IBM,7891-73X
| 7
| 1
|-
|IBM AIX 7.2
|AIX| AIX
|
|(serial number of machine)
|powerpc
|IBM,9009-42A
|7
|2
|-
| IBM i 5.3 with QSH
| OS400
| (hostname)
| (serial number of machine)
|
|
| 5
| 3
|-
| IBM i 6.1 with QSH
| OS400
| (hostname)
| (serial number of machine)
|
|
| 6
| 1
|-
| IBM i 7.1 with QSH
| OS400
| (hostname)
| (serial number of machine)
|
|
| 7
| 1
|-
| Interix (Windows Services for UNIX) 3.5
| Interix
|
| x86
| Intel_x86_Family6_Model28_Stepping10
|
| 10.0.7063.0
| 6.1
|-
| Interix, Subsystem for Unix-based Applications (SUA), AMD64 6.1 (Windows 2008 R2)
| Interix
|
| genuineintel
| Intel64_Family_6_Model_26_Stepping_4
|
| 10.0.7063.0
| 6.1
|-
| IRIX
| IRIX
|
| IP22
| mips
|
|
|
|-
| IRIX 6.5.30, Origin 2000
| IRIX64
|
| IP30
IP35
| mips
|
| 07202013
| 6.5
|-
| Linux Mint 10 "Julia" 64-bit
| Linux
| GNU/Linux
| x86_64
|
|
| #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010
| 2.6.35-22-generic
|-
| Linux on Xeon Phi
| Linux
| GNU/Linux
| k1om
| k1om
| k1om
| #2 SMP Fri Jun 21 13:43:31 EDT 2013
| 2.6.38.8-g2593b11
|-
| Mac OS X Panther 10.3, PowerBook G4 (2004)
| Darwin
|
| Power Macintosh
| powerpc
|
| Darwin Kernel Version 7.8.0: Wed Dec 22 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC
| 7.8.0
|-
| Mac OS X Snow Leopard 10.6, MacBook3,1 (Late 2007)
| Darwin
|
| i386
| i386
|
| Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386
| 10.0.0
|-
| Mac OS X Lion 10.7.3 build 11D50, MacbookPro7,1 (Late 2010)
| Darwin
|
| x86_64
| i386
|
| Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64
| 11.3.0
|-
| OS X Mountain Lion 10.8.3 build 12D78, MacbookPro10,1 (Mid 2012)
| Darwin
|
| x86_64
| i386
|
| Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
| 12.3.0
|-
| OS X Mavericks 10.9 build 13A598, MacbookPro5,1 (Mid 2009)
| Darwin
|
| x86_64
| i386
|
| Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64
| 13.0.0
|-
| OS X Yosemite 10.10 build 14A298i, MacbookPro6,2 (Mid 2010)
| Darwin
|
| x86_64
| i386
|
| Darwin Kernel Version 14.0.0: Tue Jul 15 23:56:31 PDT 2014; root:xnu-2782.1.43.0.2~1/RELEASE_X86_64
| 14.0.0
|-
| OS X El Capitan 10.11 build 15A284, MacBookPro10,1 (Mid 2012)
| Darwin
|
| x86_64
| i386
|
| Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64
| 15.0.0
|-
| macOS Sierra 10.12 build 16E195, MacBookPro12,1 (Early 2015)
| Darwin
|
| x86_64
| i386
|
| Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64
| 16.5.0
|-
| macOS High Sierra 10.13.3 build 17D47, MacBookPro12,1 (Early 2015)
| Darwin
|
| x86_64
| i386
|
| Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64
| 17.4.0
|-
| macOS Mojave 10.14.3 build 18D109
| Darwin
|
| x86_64
| i386
|
| Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64
| 18.2.0
|-
| macOS Catalina 10.15.5 build 19F101
| Darwin
| Darwin
| x86_64
| i386
| MacBookPro15.1
| Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64
| 19.5.0
|-
| macOS Big Sur 11.0.1 build 20B29 on Apple M1
| Darwin
|
| arm64
| arm
|
| Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:10 PDT 2020; root:xnu-7195.50.7~2/RELEASE_ARM64_T8101
| 20.1.0
|-
| macOS Monterey 12.2.1 build 21D62 on Apple M1
| Darwin
|
| arm64
| arm
|
| Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101
| 21.3.0
|-
| Manjaro Linux 0.8.11 64 bit
| Linux
| GNU/Linux
| x86_64
|
|
| #1 SMP PREEMPT Sat Nov 15 10:54:42 UTC 2014
| 3.17.3-1-MANJARO
|-
| Microsoft POSIX subsystem, Windows NT 4.0 (SP6), Pentium
| Windows NT
|
| Pentium
|
|
| 5
| 3
|-
| MidnightBSD 1.0, Intel
| MidnightBSD
| MidnightBSD
| amd64
| amd64
| [kernel name from kernel conf file. i.e.: GENERIC]
| MidnightBSD 1.0 #5 r11989M: Sat Aug 11 13:20:45 EDT 2018 root@stargazer.midnightbsd.org:/usr/obj/usr/src/sys/GENERIC
| 1.0
|-
| MINIX 3.1.7, x86
| Minix
|
| i686
| i386
|
| 1.7
| 3
|-
| MinGW 32 bit (Windows 7)
| MINGW32_NT-6.1
| Msys
| i686
|
|
| 2018-11-26 09:22
| 2.11.2(0.329/5/3)
|-
| MinGW 64 bit (Windows 7)
| MINGW64_NT-6.1
| Msys
| x86_64
|
|
| 2018-11-26 09:22
| 2.11.2(0.329/5/3)
|-
| MSYS 32 bit (Windows 7)
| MSYS_NT-6.1
| Msys
| i686
|
|
| 2018-11-26 09:22
| 2.11.2(0.329/5/3)
|-
| MSYS 64 bit (Windows 7)
| MSYS_NT-6.1
| Msys
| x86_64
|
|
| 2018-11-26 09:22
| 2.11.2(0.329/5/3)
|-
| NetBSD
| NetBSD
|
| i386
| i386
|
| NetBSD 6.0.1 (GENERIC)
| 6.0.1
|-
| NonStop OS H06 25
| NONSTOP_KERNEL
|
| NSE-T
|
| H06
| 25
|
|-
| NonStop OS J06 14
| NONSTOP_KERNEL
|
| NSE-AB
|
| J06
| 14
|
|-
| OpenBSD 5.4
| OpenBSD
|
| amd64
| amd64
|
| GENERIC.MP#1
| 5.4
|-
| 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
|-
|openSUSE Tumbleweed
|Linux
|GNU/Linux
|x86_64
|x86_64
|x86_64
|#1 SMP PREEMPT_DYNAMIC Mon Feb 17 10:42:46 UTC 2025 (36519ec)
|6.13.3-1-default
|-
| OpenWRT Barrier Breaker r40420 on TL-WR1043ND
| Linux
| GNU/Linux
| mips
|
|
;:unknown
;:invalid
| #1 Tue Apr 8 06:30:07 UTC 2014
| 3.10.34
|-
| QNX
| QNX
|
| x86pc
| x86
|
| 2010/07/09-14:44:03EDT
| 6.5.0
|-
| 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
|-
| ReliantUNIX
| ReliantUNIX-Y
|
| RM600
| R4000
|
| B2005
| 5.45
|-
| SINIX
| SINIX-Y
|
| RM600
| R4000
|
|
| 5.43
|-
| Solaris 2.5.1 Intel Platform Edition
| SunOS
| Solaris
| i86pc
| i386
| i86pc
| Generic_103641-42
| 5.5.1
|-
| Solaris 8
| SunOS
|
| sun4u
| sparc
| SUNW, UltraAX-i2
| Generic_117350-50
| 5.8
|-
| Solaris 9, Sun Fire 280R
| SunOS
|
| sun4u
| sparc
| SUNW, Sun-Fire-280R
| Generic_112233-08
| 5.9
|-
| Solaris 10, Sun Fire V490
| SunOS
|
| sun4u
| sparc
| SUNW, Sun-Fire-V490
| Generic_142900-13
| 5.10
|-
| Solaris 11 Express (201011), x86
| SunOS
| Solaris
| i86pc
| i386
| i86pc
| snv_151a
| 5.11
|-
| Solaris 11.1, Sun Fire X4540
| SunOS
|
| i86pc
| i386
| i86pc
| 11.1
| 5.11
|-
| OpenIndiana
| SunOS
|
| i86pc
| i386
| i86pc
| oi_151a8
| 5.11
|-
| OpenIndiana Hipster 2018.04
| SunOS
| Solaris
| i86pc
| i386
| i86pc
| illumos-47b8d4b884
| 5.11
|-
| OpenIndiana Hipster 2021.10
| SunOS
| illumos
|i86pc
|i386
|i86pc
|illumos-b12aaafbf5
|5.11
|-
| SmartOS
| SunOS
| illumos
| i86pc
| i386
| i86pc
| joyent_20250206T001102Z
| 5.11
|-
| OmniOS
| SunOS
|
| i86pc
| i386
| i86pc
| omnios-a708424
| 5.11
|-
| Tru64
| OSF1
|
| alpha
| alpha
| invalid
| 2650
| V5.1
|-
| Ubuntu 11.04
| Linux
| GNU/Linux
| x86_64
| x86_64
| x86_64
| #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011
| 2.6.38-10-generic
|-
| Ubuntu 12.0.4 on Pandaboard ES
| Linux
| GNU/Linux
| armv7l
| armv7l
| armv7l
| #33-Ubuntu SMP PREEMPT Sat Jan 26 00:46:04 UTC 2013
| 3.2.0-1425-omap4
|-
| Ubuntu 20.0.4LTS on Raspberry Pi 4 Model B
| Linux
| GNU/Linux
| aarch64
| aarch64
| aarch64
| #20-Ubuntu SMP Sun Sep 6 05:11:16 UTC 2020
| 5.4.0-1018-raspi
|-
| Ultrix
| ULTRIX
|
| VAX
|
|
| 0
| 4.5
|-
| UnxUtils 2007 32 bit (Windows Server 2008)
| WindowsNT
|
| x86
|
|
| 6
| 0
|-
| (SCO) OpenServer 5.0.6
| SCO_SV
| (hostname)
| i386
| i386
|
| 5.0.6
| 3.2
|-
| (SCO) System V
| SCO_SV
|
| i386
| i386
|
| 6.0.0
| 5
|-
| (SCO) UnixWare 7.1.4
| UnixWare
|
| i386
| x86at
|
; : hardware serial/license number, .e.g. 1AB000123 or NUL000000
; : illegal option
| 7.1.4
| 5
|-
| UWIN (64 bit Windows 7), Intel Core i5
| UWIN-W7
| UWIN
| i686-64
| x64
| 64/64
| 2012-06-26
| 5.0/6.1
|-
| SYS$UNIX:SH on OpenVMS on VAX emulator
| IS/WB
|
| vax-6340
|
|
| std
| 5.0
|-
| z/OS USS
| OS/390
|
| 2097
|
|
;
;: unknown option
;: z/OS
| 03
| 22.00
|-
| Windows Subsystem for Linux (WSL), Ubuntu 18.04
| Linux
| GNU/Linux
| x86_64
| x86_64
| x86_64
| #476-Microsoft Fri Nov 01 16:53:00 PST 2019
| 4.4.0-18362-Microsoft
|-
| Windows Subsystem for Linux (WSL2), Ubuntu 20.04
| Linux
| GNU/Linux
| x86_64
| x86_64
| x86_64
| #1 SMP Wed Aug 25 23:20:18 UTC 2021
| 5.10.60.1-microsoft-standard-WSL2
|}
See also
- List of Unix commands
- lsb_release
- ver (command)
