The uname command in CentOS obtains the instance of the system details.

Source: Internet
Author: User
Tags linux mint

In Console mode, you cannot get information about the operating system by right-clicking> about. In Linux, you can useUname command to help you complete these tasks. Uname isThe 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.


 
 
  1. # uname

  2. Linux


Maybe this cannot meet your needs. Therefore, you need to add some parameters to enable the uname to display the information you need.

The following is a list of uname parameters.

1. kernel name

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)


 
 
  1. # uname -s

  2. Linux


The output information is the same as that output when uname does not contain parameters.

2. kernel release

If you want to know which kernel release version you are using (Different kernel package versions), you can use the-r parameter.


 
 
  1. # uname -r

  2. 2.6.18-371.1.2.el5


3. kernel version

In addition to some kernel information, you can use the-v parameter uname to obtain more detailed kernel version information ).


 
 
  1. # uname -v

  2. #1 SMP Tue Oct 22 12:57:43 EDT 2013


4. node name

Parameter-n will provide the host name of your node. For example, if your host name is "dev-machine", the-n parameter prints the host name.


 
 
  1. # uname -n

  2. dev-machine


For RedHat and CentOS users, you can also view them through the/etc/redhat_release file:


 
 
  1. # cat /etc/redhat_release

  2. CentOS release 5.10 (Final)


If it is not a RedHat-based release, you can view the/etc/issue file. For example:


 
 
  1. # cat /etc/issue

  2. Linux Mint Olivia \n \l:


5. Hardware name

If you want to know which machine is used, you can try the-m parameter. It tells you about the hardware.


 
 
  1. # uname -m

  2. i686


I686 indicates that you are using a 32-bit operating system, and X86_64 indicates that you are using a 64-bit system.

6. Hardware Platform

Similar to the hardware name, the-I parameter displays your hardware platform ).


 
 
  1. # uname -i

  2. i386


Similarly, i386 means that a 32-bit system is running. If X86_64 is output, a 64-bit system is running.

7. Processor type

You can use the-p parameter to view the processor type. If the uname cannot be identified, it will display 'unknown 'as the output.


 
 
  1. # uname -p

  2. i686


8. Operating System

The uname can also disclose information about the operating system you are running. You can use the-o parameter to achieve this purpose.


 
 
  1. # uname -o

  2. GNU/Linux


9. All information

There is a parameter that shows all the information! This is the-a parameter, which displays all information. If the-I and-p outputs are unknown, they are ignored by default.


 
 
  1. # uname -a

  2. Linux dev-machine 2.6.18-371.1.2.el5 #1 SMP Tue Oct 22 12:57:43 EDT 2013 i686 i686 i386 GNU/Linux


The above is about the use of the uname command. Please wait for more commands!


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.