Introduction
The Linux command uname is a command-line utility used to print system information such as the kernel name, kernel release, kernel version, and machine hardware name. It is a useful tool for system administrators and developers to quickly identify the system they are working on. The uname command can also be used to check the version of the Linux kernel that is running on the system.
Examples
The uname command is a command-line utility for displaying system information. It is used to print the system’s name, the kernel version, the release number, the machine hardware name, and the processor type.
Syntax: uname [OPTION]…
Options:
-a, –all print all information, in the following order, except omit -p and -i if unknown:
-s, –kernel-name print the kernel name
-n, –nodename print the network node hostname
-r, –kernel-release print the kernel release
-v, –kernel-version print the kernel version
-m, –machine print the machine hardware name
-p, –processor print the processor type or “unknown”
-i, –hardware-platform print the hardware platform or “unknown”
-o, –operating-system print the operating system
Example:
$ uname -a
Linux myhost 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Using the Linux Command ‘uname’
The Linux command ‘uname’ is a useful tool for obtaining information about the system you are running. It can be used to find out the name of the operating system, the version of the kernel, and other details about the system.
To use the ‘uname’ command, simply type it into the command line and press enter. This will display the name of the operating system, the version of the kernel, and other details about the system.
For example, if you type ‘uname -a’ into the command line, it will display the following information:
Linux myhostname 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
The first line of the output is the name of the operating system, in this case ‘Linux’. The second line is the version of the kernel, in this case ‘4.4.0-21-generic’. The third line is the date and time the kernel was compiled, and the fourth line is the type of processor the system is running on.
The ‘uname’ command can also be used to display other information about the system, such as the hostname, the machine type, and the processor type. To display this information, type ‘uname -m’ into the command line.
The ‘uname’ command is a useful tool for obtaining information about the system you are running. It can be used to find out the name of the operating system, the version of the kernel, and other details about the system.