[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedMarch 6, 2023

How to use uname command.

How To Use Uname Command.

In this article, we will cover the uname command.

uname is a command-line utility that prints basic information about the operating system name and system hardware.

 

uname Command

The 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:

uname [OPTIONS]...

The options are as follows:

  • -s, (–kernel-name) – Prints the kernel name.

  • -n, (–nodename) – Prints the system’s node name (hostname). This is the name the system uses when communicating over the network. When used with the -n option, uname produces the same output as the hostname command.

  • -r, (–kernel-release) – Prints the kernel release.

  • -v, (–kernel-version) – Prints the kernel version.

  • -m, (–machine) – Prints the name of the machine’s hardware name.

  • -p, (–processor) – Prints the architecture of the processor.

  • -i, (–hardware-platform) – Prints the hardware platform.

  • -o, (–operating-system) – Print the name of the operating system. On Linux systems that is “GNU/Linux”

  • -a, (–all) – When the -a option is used, uname behaves the same as if the -snrvmo options have been given.

When invoked without any options, uname prints the kernel name, as if the -s option had been specified:

uname

As you already know, the name of the kernel is “Linux”:

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:

uname -a
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.

  • dev.linuxize.com – Hostname.

  • 4.19.0-6-amd64 Kernel release.

  • #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:

uname -srm
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.

 

Conclusion

The uname command is used to print basic system information. It is usually invoked with the -a option to display all available information.

Keep reading
How to Install Google Chrome Web Browser on CentOS 7.
September 8, 2023

How to Install Google Chrome Web Browser on CentOS 7.

How To Install Google Chrome Web Browser On CentOS 7. This tutorial explains how to install the Google Chrome web browser on CentOS 7. The same instructions apply for any RHEL based distribution, including Fedora and Scientific Linux. Installing Google Chrome on CentOS Follow the steps listed…

Read article
How to Install Tomcat 9 on CentOS 7.
September 8, 2023

How to Install Tomcat 9 on CentOS 7.

How To Install Tomcat 9 On CentOS 7. This tutorial covers the steps required to install Tomcat 9.0 on CentOS 7. Tomcat is an open-source implementation of the Java Servlet, JavaServer Pages, Java Expression Language, and Java WebSocket technologies. Install OpenJDK Tomcat 9 requires Java SE 8 or…

Read article
How to List Installed Packages on CentOS.
September 7, 2023

How to List Installed Packages on CentOS.

How To List Installed Packages On CentOS. In this tutorial, we will show you how to list and filter installed packages on CentOS. Knowing how to list installed packages on your CentOS system can be helpful in situations where you need to install the same packages on another machine or if you want…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00