Skip to main content

Command referenceuname

uname command (Linux / bash / sh / zsh)

Linuxbashshzshsystembeginner

What it does

Print kernel and machine information. When people search for the uname command linux system info, they usually want uname's everyday flags, safe examples, and how it differs from related tools. Below you'll find syntax, options, and copyable examples for Bash/sh/zsh.

Print kernel and machine information.

Syntax

uname [OPTION]...

Common options

Flag / optionMeaning
-aPrint all available fields.
-rPrint the kernel release.
-mPrint the machine hardware name.
-sPrint the kernel name.

Practical examples

All details

uname -a

Shows kernel, host, release, and architecture fields.

Kernel release

uname -r

Prints the running kernel release.

Architecture

uname -m

Prints values such as x86_64 or aarch64.

Linux ↔ Windows equivalent

Closest match: systeminfo (Windows / CMD). Display detailed operating system, hardware, boot, memory, and update information.

Common mistakes

  • Assuming uname identifies the Linux distribution and release.
  • Using machine architecture as a guarantee that every installed binary uses that architecture.

FAQ

What does uname do in Linux?

Print kernel and machine information.

How do I use uname from the terminal?

Start with `uname [OPTION]...`, then choose only the options needed for the task.

What is a practical uname example?

Try `uname -a` — Shows kernel, host, release, and architecture fields.

Can I use uname in a shell script?

Yes. uname works in Bash, sh, and Zsh, but scripts should handle quoting, errors, and command output explicitly.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.