FactorPad
Build a Better Process

Linux uname Command Summary with Examples

Linux uname allows you to display system information.
  1. Purpose - Learn what uname is for and how to find help.
  2. Options - Review a few common options and arguments.
  3. Examples - Walk through code examples with uname.
  4. A tip - Finish off with one more insight.
face pic by Paul Alan Davis, CFA
Updated: February 24, 2021
In this tutorial on Linux uname, 62 of 100, below find a 3-4 minute introductory video, a text-based tutorial and all of the code examples from the video.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / uname-command.html


An ad-free and cookie-free website.


Examples of the Linux uname Command

Beginner

Learn to display system information at the Linux command line.

Video Tutorial

Videos can also be accessed from the Linux Essentials Playlist on YouTube.

Linux uname Command Summary with Examples (3:28)

Video Script

The Command and Why You Need It

Our sixty-second word, or command to memorize is uname from our category System.

uname allows you to display system information.

Common Linux uname Options
-options description
--help Display help screen
-m, --machine Display machine hardware name
-o, --operating-system Display operating system name

Recall from videos 46 and 53, we explored environment variables, hard disk space and RAM memory, and here we'll access other system information.

Before we start, it helps to think of commands as mini programs and most follow this structure: command -option(s) argument(s).

The uname command has 11 options and no arguments.

Like most commands, help is available with double-dash --help. The -m option displays hardware, and -o the operating system, but we'll look at others in our terminal session.

So why is uname an important command? Well, you may need to access version numbers for compatibilities and system updates. And now you know how to do that.

Demonstration

Okay, the best way to embed this in your memory is by typing in your own terminal window.

Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.

Here we go. So optionless uname defaults to -s for kernel name.

$ uname Linux

Next, I'll show you the --help.

$ uname --help Usage: uname [OPTION]... Print certain system information. With no OPTION, same as -s. -a, --all print all information, in the following order, except omit -p and -i if unknown: -s, --kernel-name print the kernel name -n, --nodename print the network node hostname -r, --kernel-release print the kernel release -v, --kernel-version print the kernel version -m, --machine print the machine hardware name -p, --processor print the processor type or "unknown" -i, --hardware-platform print the hardware platform or "unknown" -o, --operating-system print the operating system --help display this help and exit --version output version information and exit GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Full documentation at: <http://www.gnu.org/software/coreutils/uname> or available locally via: info '(coreutils) uname invocation'

The choices available you can see here (above) and then -a shows all.

Then, let's focus on the kernel and release, with -sr.

$ uname -sr Linux 3.16.0-4-amd64

And last, the machine and operating system -mo.

$ uname -mo x86_64 GNU/Linux

Where machine refers to the CPU instruction set x86_64 which runs something like 90% of computers these days, and the operating system here is named GNU/Linux.

I never know, is it gu-new, new or GNU?

Anyway. ;)

A Final Tip

Okay now you know how to use uname. And you know the syntax for commands, options and arguments.

One last tip about the uname command. So I'm not sure what types of cocktail parties you attend, and if this would make for an interesting topic, but Wikipedia has an interesting page on whether the name of the operating system should be GNU/Linux or simply Linux. If interested, there's a link in the Description (YouTube).

Okay, thanks for visiting today. I hope this was a helpful introduction to the uname command.


Learn More About The Series

For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:


What's Next?

Look, no ads! There's something different going on here, subscribe and follow to be a part of it at the ground floor.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / uname-command.html


linux uname command
linux uname
uname linux
uname examples
uname command
linux kernel version
check kernel version
show linux version
find linux version
linux os version
check kernel version
linux show version
check linux hardware
uname tutorial
linux uname syntax
man uname
linux os list
linux version command line
what version of linux am i running
command to check linux version

A newly-updated free resource. Connect and refer a friend today.