In this article we are going to show you how to use uname Command in Linux operating system. If you want to learn about uname command in Linux then this post is ideal for you.
In the Linux, uname is a command-line utility that is used to display basic information (name, version and other details) about the current system and the operating system running on it.
How to Use uname command in Linux Terminal
In the Linux, the basic syntax of the uname command is show as below:
$uname [OPTIONS]...
Options of uname command:
-a, (--all)
– Show all the available information about system.-s, (--kernel-name)
– Print the kernel name.-n, (--nodename)
– Display the hostname-r, (--kernel-release)
– Display the kernel release.-v, (--kernel-version)
– Prints the kernel version.-i, (--hardware-platform)
– It is used to display the hardware platform.-m, (--machine)
– It display the name of the machine’s hardware name.-p, (--processor)
– Display the architecture of the processor.-o, (--operating-system)
– It is used to print the name of the operating system.
Examples of uname command
When you run the uname command without any option then it will display only the kernel name.
$uname
Output
Linux
Basically, the uname command is used with the -a
option to display all the available information about the current system and the operating system running on it.
$uname -a
The command above display all the available system information in the following order: Kernel name, network node hostname, kernel release date, kernel version, machine hardware name, hardware platform, operating system
Output
Linux studiesonline 4.15.0-35-generic #47-Ubuntu SMP Tue Jan 12 11:12:56 UTC 2020 x86_64 GNU/Linux
The above command display the below information:
Linux
– Kernel namestudiesonline
– Hostname4.15.0-35-generic
– Kernel release date#47-Ubuntu SMP Tue Jan 12 11:12:56 UTC 2020
– Kernel versionx86_64
– Machine hardware nameGNU/Linux
– Operating system name
uname command also allows you to combine multiple options with each other for a specific output.
For an example, if you want to display the hostname
and kernel release
of your system, run the command below:
$uname -rn
OR
$uname -nr
To display the kernel name
$uname -s
To display the kernel version
$uname -v
Print the machine hardware name
$uname -m
To display architecture of the processor
$uname -p
To display the hardware platform
$uname -i
Display the name of the operating system
$uname -o
That’s all.
If you face any error and issue in above steps , please use comment box below to report.
If our tutorials helped you, please consider buying us a coffee. We appreciate your support!
Thank you for your support.