Name

uname — stdin  stdout  - file  -- opt  --help  --version

Synopsis

uname [options]

The uname command prints fundamental information about the lowest level of the OS X operating system, known as the kernel:

uname -a
Darwin mymac.home 11.3.0 Darwin Kernel Version 11.3.0:
 Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1
 /RELEASE_X86_64 x86_64

This includes the kernel name (Darwin), hostname (mymac.home), kernel release (11.3.0), and kernel version (Darwin Kernel Version 11.3.0: Thu Jan 12 ...). Each of these values can be printed individually using options.

Useful options

-a

All information.

-s

Only the kernel name (the default).

-n

Only the hostname, as with the hostname command.

-r

Only the kernel release number.

-v

Only the kernel version.

-m

Only the hardware name, e.g., x86_64.

-p

Only the processor type, e.g., i386.

Get Macintosh Terminal Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.