Site icon DesignLinux

Uname Command in Linux

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:

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,

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.

Exit mobile version