Command referenceuname
uname command (Linux / bash / sh / zsh)
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 / option | Meaning |
|---|---|
| -a | Print all available fields. |
| -r | Print the kernel release. |
| -m | Print the machine hardware name. |
| -s | Print 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.
Related commands
- whoamiPrint the effective user name of the current process.
- systeminfoDisplay detailed operating system, hardware, boot, memory, and update information.
- dfReport free and used space for mounted filesystems.
- systemctlControl and inspect services and other systemd units.
- Get-ServiceRetrieve service controller objects and current service states.
- exportMark shell variables for inheritance by child processes.
- setDisplay, create, or remove CMD environment variables.
- shutdownShut down, restart, sign out, or schedule power actions.
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.