When you are in console mode, you cannot get information about the operating system through the right mouse button > about. At this point, under Linux, you can use the uname command to help you do the work. Uname is the abbreviation for UNIX name. Just type uname when you actually use it in the console. When you enter uname without parameters, it simply displays the name of your operating system.
[[email protected] ~]# unameLinux
Maybe it's not enough to meet your needs. So you need to add some parameters to make uname display the information you need.
Kernel name you can display the kernel name with the-s parameter. (You can run this command on other Unix-like systems to see if your Mac will show Darwin)
[[email protected]_aliyun ~]# uname -sLinux
Kernel release If you want to know which kernel release you are using (referring to a different kernel package version), you can use the-r parameter
[[email protected]_aliyun ~]# uname -r2.6.32-358.6.2.el6.x86_64
Kernel version In addition to some kernel information, with the-v parameter uname can also obtain more detailed kernel version information (not the version number, refers to the time of the kernel and CPU architecture, etc.).
[[email protected]_aliyun ~]# uname -v1 SMP Thu May 16 20:59:36 UTC 2014
The hostname parameter-n is provided to the host name of your node. For example, if your hostname is "Dev_aliyun", the-n parameter will print out the host name.
[[email protected]_aliyun ~]# uname -ndev_aliyun
For Redhat and CentOS users, you can also use the/etc/redhat_release file to view:
[[email protected]_aliyun ~]# cat /etc/redhat_releaseCentOS release 6.5 (Final)
If it is not based on the Redhat release, you can view the/etc/issue file. Similar to the following:
[[email protected]_aliyun ~]# cat /etc/issue Linux Mint Olivia \n \l:
Hardware name if you want to know what kind of machine you're using, you can try the-m parameter. It will give you information about the hardware.
[[email protected]_aliyun ~]# uname -mx86_64
The hardware platform i686 shows that you are using a 32-bit operating system, and if it is x86_64 you are using a 64-bit system.
[[email protected]_aliyun ~]# uname -i x86_64
Again, i386 means that it is running a 32-bit system, and if the output is x86_64 then you are running a 64-bit system.
Processor type You can view the processor type with the-p parameter. If uname is not recognized, it will display ' unknown ' as output
[[email protected]_aliyun ~] # uname -p x86_64
Operating system uname can also reveal the operating system information you are running, with the-o parameter can achieve this purpose.
[[email protected]_aliyun ~] # uname -o GNU/Linux
All information has one parameter to show all the information! This is the-a parameter, which displays all the information. If the-I and-p outputs are unknown, they are omitted by default.
[[email protected]_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
Nine uname command instances for CentOS system details