In this article, we will discuss the uname command which is a frequently used and easy-to-use command to get system-related information. We will see the command with various options to get different information related to your machine.
What is “uname” command
The uname command is used to get the information related to the Operating System and the hardware. The syntax of the command is:
$ uname [option]
Examples of using “uname” command
The -a option is used to get all the information related to the system. The output is printed in the following order: Kernel name, network node hostname, kernel release date, kernel version, machine hardware name, hardware platform, operating system.
$ uname -a
This is done using -s option
$ uname -s
We can print the hostname of the node using -n option.
$ uname -n
Kernel Release Date
-r option prints the release date of the kernel
$ uname -r
-v prints the version of the current kernel
$ uname -v
Operating System name
The -o option prints the name of the Operating System
$ uname -o
To get the hardware name of the machine, use -m option
$ uname -m
Type of processor
To get the type of processor, use the -p option
$ uname -p
To get a hardware platform, use -i option
$ uname -i
To combine multiple options, use the below syntax
$ uname -srm
In this article, we went through the definition and various options of the uname command. You must have realized that uname is an easy-to-use and frequently used command for Linux users.
People are also reading: