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 unamewhen you actually use it in the console.
When you enter uname without parameters, it simply displays the name of your operating system.
# 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.
The following is a list of the uname parameters:
1. 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)
# Uname-slinux
The output information will be the same as when the uname is output without parameters.
2. Kernel Release version
If you want to know which kernel distribution you are using (referring to a different kernel package version), you can use the- r parameter
# Uname-r2.6.18-371.1.2.el5
3. Kernel version
In addition to some kernel information, with the- v parameter uname can also get more detailed kernel version information (not the version number, refers to the time of the kernel and CPU architecture, etc.).
# uname-v#1 SMP Tue Oct 12:57:43 EDT 2013
4. Node name
The parameter-n gives you the hostname of the node. For example, if your hostname is "dev-machine", the-n parameter will print out the host name.
# Uname-ndev-machine
For Redhat and CentOS users, you can also use the /etc/redhat_release file to view:
# Cat/etc/redhat_releasecentos Release 5.10 (Final)
If it is not based on the Redhat release, you can view the /etc/issue file. Similar to the following:
# Cat/etc/issuelinux Mint Olivia \ \l:
5. Hardware Name
If you want to know what kind of machine you are using, you can try the- m parameter. It will give you information about the hardware.
# uname-mi686
i686 shows that you are using a 32-bit operating system, and if it is x86_64 you are using a 64-bit system.
6. Hardware Platform
Similar to the hardware name, the-i parameter shows your hardware platform (the hardware name i686 belongs to the hardware Platform I386 series).
# uname-ii386
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.
7. Processor type
You can view the processor type with the- p parameter. If uname is not recognized, it displays ' unknown ' as the output.
# uname-pi686
8. Operating system
Uname can also reveal the operating system information you are running, with the- o parameter for this purpose.
# Uname-ognu/linux
9. All information
There is a 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.
# uname-alinux Dev-machine 2.6.18-371.1.2.el5 #1 SMP Tue Oct (12:57:43 EDT) i686 i686 i386 Gnu/linux
Nine uname commands get an example of Linux system details