In this article we will cover the commands uname
.
uname is a command-line utility that prints basic information about the name of the operating system and system devices.
Uname command
Tools uname
Most commonly used for displaying processor architecture, system hostname, and kernel version running on the system.
Syntax of the command uname
It takes the following form:
uname [OPTIONS]...
The options are as follows:
-s
, (--kernel-name
) – Print the kernel name.-n
, (--nodename
) – Print the node name (hostname). This is the name the system uses when communicating over the network. When used with options-n
Uname, produces the same command outputhostname
.-r
, (--kernel-release
) – kernel version.-v
, (--kernel-version
) – Print the kernel copy.-m
, (--machine
) – Print the device name.-p
, (--processor
) – Print processor engineering.-i
, (--hardware-platform
) – printing devices platform.-o
, (--operating-system
) – Print the operating system name. On Linux it is “GNU / Linux”-a
, (--all
) – When will the options-a
user,uname
Act as if it was a choice-snrvmo
Was given.
When connected without any options, uname
Prints out the kernel name, as if it were an option -s
It has been identified:
uname
As you already know, the kernel name is “Linux”:
Linux
You don’t have to remember all command line options. Usually orders uname
Used with options -a
To print all available information:
uname -a
Linux dev.linuxid.net 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux
The output includes the following information:
Linux
– The name of the kernel.dev.linuxid.net
Hostname.4.19.0-6-amd64
Free the kernel.#1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20)
– Kernel versionx86_64
– The architectural name of the devices.GNU/Linux
Name of the operating system.
The options can be combined with each other to produce the desired output. For example, to find out which version of Linux kernel is running on the system, you can type the following command:
uname -srm
Linux 4.19.0-6-amd64 x86_64
When using multiple options, the information in the output is in the same order that the options provide -a
. It does not matter where the options are given. Uname -msr
And the uname -srm
Produce the same product.
Conclusion
Command uname
Used to print basic system information. Usually used with options -a
To display all available information.
.
Originally posted 2020-11-17 21:07:09.