Print system information including kernel version and architecture.
low risk
uname displays kernel and system information. Commonly used to verify the kernel version before patching, check CPU architecture for binary compatibility, and in scripts that need to adapt behavior per OS or architecture.
| Flag | Meaning |
|---|---|
-a --all | Print all system information |
-r --kernel-release | Print kernel version only |
-m --machine | Print machine hardware architecture |
-s --kernel-name | Print OS name (Linux) |
-n --nodename | Print hostname |
uname -aFull system information · explain & risk-check →uname -rKernel version only (e.g., for module compatibility) · explain & risk-check →uname -mArchitecture (x86_64, aarch64, etc.) · explain & risk-check →In CI/CD scripts, use `uname -m` to detect architecture and pull the correct binary (amd64 vs arm64) — critical for multi-arch Docker image builds.
Reference text is hand-written and may be incomplete — check man uname for your version. Test destructive commands on a non-production system first.