Daily Latest Tech Update

An Introduction to Uname Commands on Linux

  • Share

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 -nUname, produces the same command output hostname.
  • -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:


As you already know, the kernel name is “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 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.
  • Hostname.
  • 4.19.0-6-amd64 Free the kernel.
  • #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) – Kernel version
  • x86_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.


Command uname Used to print basic system information. Usually used with options -a To display all available information.


Source link

  • Share

Leave a Reply

Your email address will not be published. Required fields are marked *