Linux Commands

Linux UNAME Command

“UNAME is an extremely useful Linux command that provides you the information regarding your system’s hardware and software on the go. This command can provide you with a detailed report about these statistics as well as the information related to the individual entities depending upon the options used with this command. Therefore, in this article, we will use the UNAME command in Linux in different ways.”

Usage of the UNAME Command in Linux

The UNAME command in Linux can be used for multiple purposes that you can get to know by running the following command:

$ uname --help

This command will list down all the different purposes for which you can use the UNAME command in Linux, as shown in the image below:

Now, you can go through the following examples to see the working of this command:

Example # 1: Print All the System Information

If you want to display all the system information on the terminal, then you need to use the UNAME command in the manner shown below:

$ uname –a

All the system information related to our Linux system is shown in the following image:

Example # 2: Print the Kernel Name Only

Now, if you only want the Kernel name to be printed on the terminal, then you can run the command shown below:

$ uname –s

The Kernel name of our system is shown in the following image:

Example # 3: Print the Network Node Hostname Only

You can also use the UNAME command in Linux for printing the network node hostname in the manner shown below:

$ uname –n

The network node hostname of our Linux system is shown in the following image:

Example # 4: Print the Kernel Release Only

The UNAME command can also be used for printing the Kernel release on the terminal by running it as shown below:

$ uname –r

The Kernel release of our system is shown in the image that follows:

Example # 5: Print the Kernel Version Only

If you just want to print the Kernel version on the terminal, then you can execute the UNAME command as shown below:

$ uname –v

The Kernel version of our system is shown in the following image:

Example # 6: Print the Machine Hardware Name Only

To print the machine hardware name on the terminal, you can run the UNAME command as shown below:

$ uname –m

The machine hardware name of our Linux system is displayed in the following image:

Example # 7: Print Processor Type Only

The UNAME command can even be used for printing the processor type on the terminal, as shown below:

$ uname –p

The processor type of our Linux system is shown in the following image:

Example # 8: Print the Hardware Platform Only

To use the UNAME command to print the hardware platform on the terminal, you can execute it as shown below:

$ uname –i

The hardware platform information of our system is shown in the following image:

Example # 9: Print the Operating System Only

Finally, you can also use the UNAME command in Linux for printing the operating system information on the terminal in the manner shown below:

$ uname –o

The operating system of our machine is shown in the following image:

Conclusion

This article was crafted to discuss the different usage scenarios of the UNAME command in Linux. After introducing you to this command, we shared with you all the different options that can be used with this command so that you can effectively use this command for your intended purpose.

Similar Posts