How To Display The System Information Using uname Command In Linux/Unix?

How To Display The System Information Using uname Command In Linux/Unix?

   

This post was last updated on August 1st, 2020 at 12:42 pm

Uname is a command used in Linux/Unix to print the system information. Most commonly used to determine the processor architecture, hostname, kernel information, etc. The GNU version of uname is included in “sh-utils” or “coreutils” packages. Ahead in this article, we will discuss uname command and its usage.

Syntax of uname command

Following is the syntax of uname command –

uname [options]

Options

The options that can be used with uname command are –

OptionsDescription
-a, --allPrint all the information displayed by following options
-s, --kernel-nameDisplay the kernel name
-n, --nodenamePrint the network hostname
-r, --kernel-releaseIt will print the kernel release
-v, --kernel-versionPrint the kernel version
-m, --machinePrint the machine hardware name
-p, --processorIt will print the processor type
-i, --hardware-platformPrint the hardware platform
-o, --operating-systemPrint the operating system
--helpdisplay the option with the summary
--versionIt will display the current version of uname(Coreutils)

Now let see some usage of uname command.

How to display the processor architecture of a system?

To display the processor architecture or processor type you need to use -p option with uname command. Use the following command in your terminal –

uname -p

or

uname --processor

Here x86_64 is the processor architecture of your system.

How to display the hostname of a system?

To display the hostname of a system you need to use the -n option with the uname command. Now use the following command in your terminal to display the hostname –

uname -n

or

uname --nodename

How to print the kernel version of a Linux or Unix machine?

To display the kernel version used in a Linux/Unix machine use the -v or –kernel-version with uname command. Now Use the following command in the terminal –

uname -v

or

uname --kernel-version

 

Conclusion

By reading this article you learn to find various information about a system with uname command. Now if you have any thoughts you can share it with us in the comments below.

Previous How To Kill A Running Process In Linux/Unix?
Next How To Check Current Version Of Ubuntu Using lsb_release Command?

About author

You might also like

How To 0 Comments

How To Install Ubuntu 20.04 LTS?

This post was last updated on August 1st, 2020 at 12:51 pmUbuntu is among the most popular Linux distributions. It is easy to use, easy to install, and includes everything

Linux Topics 0 Comments

How To Display Date And Time In The Output Of History Command In Linux?

This post was last updated on August 1st, 2020 at 12:23 pmHistory command displays the list of commands that have been executed from a terminal. By default, it shows the

Linux Topics 0 Comments

How To Upgrade To Ubuntu 20.04 LTS From Ubuntu 18.04 Or Ubuntu 19.10?

This post was last updated on August 1st, 2020 at 12:30 pmUbuntu comes in two releases the first one is LTS and the second is standard versions. LTS (Long Term

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply