Skip to content

Linux commands: uname

A quick guide to the `uname` command, used to print details about the current machine and the operating system running on it

Calling uname without any options will return the Operating System codename:

The m option shows the hardware name (x86_64 in this example) and the p option prints the processor architecture name (i386 in this example):

The s option prints the Operating System name. r prints the release, v prints the version:

The n option prints the node network name:

The a option prints all the information available:

On macOS you can also use the sw_vers command to print more information about the macOS Operating System. Note that this differs from the Darwin (the Kernel) version, which above is 19.6.0.

Darwin is the name of the kernel of macOS. The kernel is the "core" of the Operating System, while the Operating System as a whole is called macOS. In Linux, Linux is the kernel, GNU/Linux would be the Operating System name, although we all refer to it as "Linux"

The uname command works on Linux, macOS, WSL, and anywhere you have a UNIX environment

β†’ Download my free CLI Handbook!

THE VALLEY OF CODE

THE WEB DEVELOPER's MANUAL

You might be interested in those things I do:

  • Learn to code in THE VALLEY OF CODE, your your web development manual
  • Find a ton of Web Development projects to learn modern tech stacks in practice in THE VALLEY OF CODE PRO
  • I wrote 16 books for beginner software developers, DOWNLOAD THEM NOW
  • Every year I organize a hands-on cohort course coding BOOTCAMP to teach you how to build a complex, modern Web Application in practice (next edition February-March-April-May 2024)
  • Learn how to start a solopreneur business on the Internet with SOLO LAB (next edition in 2024)
  • Find me on X

Related posts that talk about cli: