View Linux system version and kernel information

Source: Internet
Author: User

Linux
View Linux system version information
1. View the kernel version
1) Method One: Log in to Linux execution cat/proc/version
[Email protected]_32bit_ip12 ~]$ cat/proc/version
Linux version 2.6.18-194.el5 ([email protected]) (GCC version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri APR 2 14:58:35 EDT 2010
2) Method Two: Log in to Linux execution uname-a
[Email protected]_32bit_ip12 cpp]$ uname-a
Linux centos5_32bit_ip12 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT. i686 i686 i386 Gnu/linux

3) method Three: Log in to Linux execution uname-r
[Email protected]_32bit_ip12 cpp]$ uname-r 2.6.18-194.el5

2. View Linux Versions
1) Method One: Log in to the server to perform lsb_release-a, and then list all the version information
[Email protected]_32bit_ip12 ~]$ lsb_release-a
LSB Version:: Core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch distributor Id:centos
Description:centos Release 5.5 (Final) release:5.5
Codename:final

2) Method Two: Log in to Linux execution cat/etc/issue
[Email protected]_32bit_ip12 ~]$ cat/etc/issue CentOS release 5.5 (Final) Kernel \ r on an \m

3) method Three: Log in to Linux execution cat/etc/redhat-release
[Email protected]_32bit_ip12 ~]$ cat/etc/redhat-release CentOS release 5.5 (Final)
3. Check whether the Linux machine is a 32-bit or 64-bit method
1) Method One: Log on to the Linux execution File/sbin/init or file/bin/ls
[Email protected]_32bit_ip12 ~]$ File/sbin/init
/sbin/init:elf 32-bit LSB executable, Intel 80386, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses shared LIBS), for Gnu/linux 2.6.9, stripped if realistic 32-bit, is represented as a 32-bit operating system
2) Method Two: Login to the Linux execution uname-a
[Email protected]s5_32bit_ip12 ~]$ uname-a
Linux centos5_32bit_ip12 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT a i686 i686 i386 Gnu/linux i686 represents a 32-bit machine i686 just i386 A subset of the supported CPUs starting with Pentinum 2 (686) and previous models are not supported.
3) method Three: Login to the Linux execution getconf long_bit
Run commands on 32-bit machines and 64-bit machines 1) 32-bit machines
[[Email protected]_32bit_ip12 ~]$ getconf Long_bit 32
After executing the above command, direct output 32, expressed as 32-bit operating system
2) 64-bit machine
[[Email protected]_32bit_ip12 ~]$ getconf long_bit 64

After executing the above command, direct output 64, expressed as 64-bit operating system

Reference Document http://blog.csdn.net/zhuying_linux/article/details/6859286

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.