Linux uname command - view system information in Ubuntu with examples

  • Last updated: Oct 23, 2024
  • Views: 159
  • Author: Admin

To effectively manage an Ubuntu-based operating system, it will be extremely useful for you to know system information. Knowing system information about your system will be useful for configuring, diagnosing, and also for optimizing the operation of the entire system as a whole.

System information in Ubuntu may include parameters such as the operating system version, processor specifications, amount of RAM, information about the hardware itself and installed drivers.

In this article we will look at a very simple and at the same time convenient command for viewing system information called uname. The uname command is a powerful tool that provides key information about your operating system and today we will look at this command in detail.

 

Command syntax:

uname [options]

  • -a - Displays all available information about the system.
  • -s - Displays the operating system name.
  • -n - Displays the network name of the node (hostname).
  • -r - Prints the kernel release.
  • -v - Displays the kernel version.
  • -m - Prints the machine architecture.
  • -p - Displays the processor type.
  • -i - Displays the hardware platform.
  • -o - Displays the operating system type.

 

Examples of the uname command.

1. The very first example is to simply show the result of the uname command without parameters. The command will only output the operating system type and nothing else.

~$ uname

ubuntu command uname


 

2. The second example will show how to use the uname command with the -a parameter.

~$ uname -a

ubuntu command uname -a

The command displays all system information in one output.

Result of command execution:

  • Linux - The name of the operating system kernel.
  • ubuntu - Host name (hostname).
  • 6.8.0-47-generic - Kernel version.
  • #47-Ubuntu SMP - Kernel build metadata (build numbers and types).
  • x86_64 - Processor architecture.
  • GNU/Linux - Operating system type.

 

3. The third example will show how to use the uname command with the -s parameter.

~$ uname -s

ubuntu command uname -s

The result of the command will show only the name of the operating system kernel.


 

4. The fourth example will show how to use the uname command with the -n parameter.

~$ uname -n

ubuntu command uname -n

The resulting output will show the server name (hostname).


 

5. The fifth example will show how to use the uname command with the -r parameter.

~$ uname -r

ubuntu uname command -r

The command output will show the current kernel version.


 

6. The sixth example will show how to use the uname command with the -v parameter.

~$ uname -v

ubuntu command uname -v

The result will be the date and time the kernel was built.


 

7. The seventh example will show how to use the uname command with the -m parameter.

~$ uname -m

ubuntu command uname -m

The command will output the hardware platform architecture.


 

8. The eighth example will show how to use the uname command with the -p parameter.

~$ uname -p

ubuntu command uname -p

The command will output the processor type. On some systems, processor information may not be available, and therefore you may see unknown as the result.


 

9. The ninth example will show how to use the uname command with the -i parameter.

~$ uname -i

ubuntu uname -i command

The command prints the hardware platform. On some systems, platform information may not be available, so you may see unknown as the result.


 

10. The tenth example will show how to use the uname command with the -o parameter.

~$ uname -o

ubuntu uname -o command

The result of the command will show the operating system type.


 

As a result, the commands we have reviewed will help you quickly and easily obtain basic information about your system, which will be especially useful for diagnosing and configuring your system.

 

SIMILAR ARTICLES

How to Install Composer on Ubuntu 24.04
How to Install and Enable SSH on Ubuntu