The uname command in Linux
Learning Linux, you’ll come across plenty of details worth knowing. You use Linux every day without realizing it: it runs on smartphones, cars, supercomputers, home appliances, personal computers and enterprise servers, and you’ll even find it in thermostats, fridges and TVs. A large share of the internet and the world’s stock exchanges also runs on this secure, reliable operating system. In this post we’ll show you how to find your Linux operating system name and kernel version.
uname is one of the most common commands for finding your Linux system’s name. You can also use it to check whether you’re running a 32-bit or 64-bit system. It’s a command-line tool that prints basic information about the operating system and hardware. Read on to get to know the uname command in Linux.
The uname command
uname is mostly used to find out the processor architecture, the system’s hostname and the version of the kernel running on it. The syntax is:
uname [OPTIONS]...
The options are:
-s, (--kernel-name): prints the kernel name.-n, (--nodename): prints the system’s node name (hostname), the name the system uses when communicating over the network. With-n, uname gives the same output as thehostnamecommand.-r, (--kernel-release): prints the kernel release.-v, (--kernel-version): prints the kernel version.-m, (--machine): prints the machine hardware name.-p, (--processor): prints the processor architecture.-i, (--hardware-platform): prints the hardware platform.-o, (--operating-system): prints the operating system name, which is “GNU/Linux” on Linux systems.-a, (--all): behaves as if-snrvmowere given.
Run without any options, uname prints the kernel name, as if -s were given:
uname
As you’d expect, the kernel name is “Linux”:
Linux
You don’t need to memorize every option. Usually uname is run with -a to print everything:
uname -a
Linux dev.linuxize.com 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux
The output includes:
Linux: the kernel name.dev.linuxize.com: the hostname.4.19.0-6-amd64: the kernel release.#1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20): the kernel version.x86_64: the machine hardware name.GNU/Linux: the operating system name.
You can combine options to get just the output you want. For example, to see the kernel release along with the kernel name and architecture, type:
uname -srm
Linux 4.19.0-6-amd64 x86_64
Summary
The uname command prints basic system information. It’s most often run with -a to show everything available.
We hope you found this useful. Share your comments and questions below, and follow Mizbandade for more.

