How to View Kernel and System Information Using the uname Command in Linux

When you are logged into a massive, headless Linux server via SSH, the standard terminal prompt rarely tells you what specific operating system you are running. If you are a DevOps engineer deploying a complex Docker container, you must absolutely verify if the server is running an outdated 32-bit kernel or a modern 64-bit architecture before attempting the installation. To instantly print critical information about the underlying operating system and the exact version of the Linux kernel, you must use the uname command.

How to Use the uname Command

The uname (Unix Name) command is a core, fundamental utility that exists on practically every Unix-like operating system ever built. It requires zero configuration and zero administrative privileges.

If you open your terminal and simply type uname by itself, it will likely just output the single word “Linux.” While this confirms you are not on a macOS or BSD system, it is generally useless for deep diagnostic work. You must use specific flags to extract the exact data you need.

  • Print the Kernel Release Version: Run uname -r. This is the most frequently used flag. It will output a strict numeric string (e.g., 5.15.0-89-generic). This is critical when you are compiling custom hardware drivers, as the driver code must precisely match this kernel release number to compile successfully.
  • Print the Machine Hardware Architecture: Run uname -m. This tells you the physical instruction set the CPU is using. If it outputs x86_64, you are running a standard modern 64-bit Intel/AMD server. If it outputs aarch64, you are running on modern ARM architecture (like an Amazon Graviton instance or a Raspberry Pi). If it outputs i686, you are stranded on a severely outdated 32-bit legacy server.
  • Print the Network Node Hostname: Run uname -n. This outputs the name the server uses to identify itself on the local network (identical to running the standard hostname command).

The “Print Everything” Flag

If you are submitting a bug report to a software developer and they ask for your complete system specifications, you do not need to run five different commands. You can instruct the utility to dump every piece of information it possesses onto a single line of text by using the “all” flag.

uname -a

This will output a dense string containing the Kernel Name, the Network Hostname, the precise Kernel Release Version, the exact timestamp the kernel was originally compiled, and the CPU Architecture, all spaced perfectly for easy copying and pasting into a support ticket.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.