• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

Uname Command in Linux

Written by Admin, Updated On May 28, 2020
terminal, uname
uname command in linux

Uname command is used to display basic information about the operating system and hardware. In addition, you can use options with uname to print kernel details and system architecture.

uname Command#

uname is the short name for “UNIX name”. This command works on all Linux and Unix like operating systems. Mostly, it is used to know hostname, processor architecture, and the version of the kernel running on the system.

Following is the basic syntax of the uname command:

uname [OPTIONS]...

The options are as below:

  • -a, (--all) – It will show all the available information about system. -snrvmo will produce the same output.
  • -s, (--kernel-name) – Prints the kernel name.
  • -n, (--nodename) – Display hostname
  • -r, (--kernel-release) – Prints the kernel release.
  • -v, (--kernel-version) – Display the kernel version.
  • -i, (--hardware-platform) – To show the hardware platform.
  • -m, (--machine) – Shows the name of the machine’s hardware name.
  • -p, (--processor) – Prints the architecture of the processor.
  • -o, (--operating-system) – Print the name of the operating system. On Linux systems that is “GNU/Linux”

When you run uname command without any options it just prints the core operating system name.

uname

The output will be the name of the kernel is “Linux”:

Linux

Generally, the uname command is used with the -a option to print all the information:

uname -a
Linux tecnstuff 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 GNU/Linux

Here,

  • Linux – It’s Kernel name
  • tecnstuff – This is Hostname
  • 4.15.0-101-generic is Kernel release
  • 102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 – Kernel version
  • x86_64 – Machine hardware name
  • GNU/Linux – Operating system name

You can use the options with each other for a specific output. For instance, to determine the hostname and kernel name of your system, you would type:

uname -rn
tecnstuff 4.15.0-101-generic

The output will be in the same sequence as output show with -a option. So it doesn’t matter if you issue -rn or -nr it will show output same in sequence.

Conclusion#

In this tutorial we learned how to use uname command to get kernel, system, hardware and processor information, etc. Generally, it is used with -a option to display all available information.

I hope you enjoyed reading and please leave your suggestion in the below comment section.

If you have any questions or suggestion, please leave a comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install OpenCV on Debian 10 Linux
Next Article   How to Install R on Ubuntu 20.04

Related Posts

  • How to Install SSH Keys on Ubuntu 22.04

    How to Set up SSH Keys on Ubuntu 22.04

    January 7, 2023
  • How to Install Fail2ban on Ubuntu 22.04

    How to Install and Configure Fail2ban on Ubuntu 22.04

    December 5, 2022
  • How to Enable SSH on Ubuntu 22.04

    How to Enable SSH on Ubuntu 22.04

    December 1, 2022

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install SSH Keys on Ubuntu 22.04
    How to Set up SSH Keys on Ubuntu 22.04 January 7, 2023
  • How to Install Mongodb on Debian 11
    How to Install MongoDB on Debian 11 Linux January 11, 2023
  • How to Install Puppet Agent on Ubuntu 22.04
    How to Install Puppet Agent on Ubuntu 22.04 January 22, 2023
  • How to Install Python 3.11 on Debian 11
    How to Install Python on Debian 11 January 25, 2023
  • How to Change-Hostname Ubuntu 22.04
    How to Change Hostname on Ubuntu 22.04 January 19, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook