Obtain nine uname command instances for CentOS system details
In Console mode, you cannot get information about the operating system by right-clicking> about. In Linux, you can use the uname command to help you complete these tasks. Uname is the abbreviation of unix name. In the console, you only need to type uname. When you enter an uname without a parameter, it only displays the name of your operating system.
[root@bin2vm ~]# unameLinux
Maybe this cannot meet your needs. Therefore, you need to add some parameters to enable the uname to display the information you need.
You can use the-s parameter to display the kernel name. (You can run this command on other Unix-like systems. For example, the mac will show Darwin)
[root@dev_aliyun ~]# uname -sLinux
If you want to know which kernel version you are using (Different kernel package versions), you can use the-r parameter.
[root@dev_aliyun ~]# uname -r2.6.32-358.6.2.el6.x86_64
In addition to kernel information, the kernel version can also obtain more detailed kernel version information with the-v parameter uname (not the version number, that is, the kernel creation time and CPU architecture ).
[root@dev_aliyun ~]# uname -v1 SMP Thu May 16 20:59:36 UTC 2014
Host name parameter-n will provide the host name of your node. For example, if your host name is "dev_aliyun", the-n parameter prints the host name.
[root@dev_aliyun ~]# uname -ndev_aliyun
For RedHat and CentOS users, you can also view them through the/etc/redhat_release file:
[root@dev_aliyun ~]# cat /etc/redhat_releaseCentOS release 6.5 (Final)
If it is not a RedHat-based release, you can view the/etc/issue file. For example:
[root@dev_aliyun ~]# cat /etc/issue Linux Mint Olivia \n \l:
Hardware name if you want to know which type of machine is used, you can try the-m parameter. It tells you about the hardware.
[root@dev_aliyun ~]# uname -mx86_64
The hardware platform i686 indicates that you are using a 32-bit operating system. If it is X86_64, it indicates that you are using a 64-bit system.
[root@dev_aliyun ~]# uname -i x86_64
Similarly, i386 means that a 32-bit system is running. If X86_64 is output, a 64-bit system is running.
You can use the-p parameter to view the processor type. If the uname cannot be identified, it will display 'unknown 'as the output
[root@dev_aliyun ~] # uname -p x86_64
The operating system uname can also disclose information about the operating system you are running, which can be achieved with the-o parameter.
[root@dev_aliyun ~] # uname -o GNU/Linux
All information has one parameter to show all information! This is the-a parameter, which displays all information. If the-I and-p outputs are unknown, they are ignored by default.
[root@dev_aliyun ~]# uname -aLinux dev_aliyun 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux