Posted on March 6, 2023 by darshin
In this article, we will cover the
uname is a command-line utility that prints basic information about the operating system name and system hardware.
uname tool is most commonly used to determine the processor architecture, the system hostname and the version of the kernel running on the system.
The syntax of the
uname command takes the following form:
The options are as follows:
--kernel-name) – Prints the kernel name.
--nodename) – Prints the system’s node name (hostname). This is the name the system uses when communicating over the network. When used with the
unameproduces the same output as the
--kernel-release) – Prints the kernel release.
--kernel-version) – Prints the kernel version.
--machine) – Prints the name of the machine’s hardware name.
--processor) – Prints the architecture of the processor.
--hardware-platform) – Prints the hardware platform.
--operating-system) – Print the name of the operating system. On Linux systems that is “GNU/Linux”
--all) – When the
-aoption is used,
unamebehaves the same as if the
-snrvmooptions have been given.
When invoked without any options,
uname prints the kernel name, as if the
-s option had been specified:
As you already know, the name of the kernel is “Linux”:
You don’t have to remember all the command line options. Usually, the
uname command is used with the
-a option to print all available information:
Linux test-liviu 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux– Kernel name.
#1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20)– Kernel version.
x86_64– Machine hardware name.
GNU/Linux– Operating system name.
The options can be combined with each other to produce the desired output. For example, to find out what version of the Linux kernel is running on your system, you would type the following command:
Linux 3.10.0-1160.81.1.el7.x86_64 x86_64
When multiple options are used the information contained in the output is in the same order as provided by the
-a option. The position of the given options doesn’t matter. Both
uname -msr and
uname -srm produces the same output.
uname command is used to print basic system information. It is usually invoked with the
-a option to display all available information.
Leave A Comment
What’s happening in your mind about this post !