Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Where can I view the CentOS version information

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "where to view the CentOS version information". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

There are the following commands to view:

# 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.4 (Final)

Release: 5.4

Codename: Final

This command applies to all linux, including Redhat, SuSE, Debian, Centos, and other distributions.

Root@MyMail ~ # uname

Linux

Root@MyMail ~ # uname-r

2.6.18-164.el5

[root@localhost] # uname-a

Linux localhost.localdomain 2.6.18-194.el5 # 1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 i686 i386 GNU/Linux

The following two methods are suitable for RedHat,CentOS

Root@MyMail ~ # cat / etc/redhat-release

CentOS release 5.4 (Final)

Log in to linux to execute rpm-Q redhat-release

# rpm-Q redhat-release

Or CentOS

Root@MyMail ~ # rpm-Q centos-release

Centos-release-5-4.el5.centos.1

Current centos version corresponds to redhat version of the command

# cat / proc/version

Linux version 2.6.9-78.ELsmp (mockbuild@builder16.centos.org) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) # 1 SMP Fri Jul 25 00:04:28 EDT 2008

Methods:

1) [root@localhost ~] # cat / proc/version

Linux version 2.6.18-194.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) # 1 SMP Fri Apr 2 14:58:14 EDT 2010

2)

[root@localhost] # uname-a

Linux localhost.localdomain 2.6.18-194.el5 # 1 SMP Fri Apr 2 14:58:14 EDT 2010 x86 "64 GNU/Linux

3)

[root@localhost ~] # uname-r

2.6.18-194.el5

two。 View the linux version:

1) list all version information

[root@localhost] # lsb_release-a

LSB Version:: core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch

Distributor ID: CentOS

Description: CentOS release 5.5 (Final)

Release: 5.5

Codename: Final

Note: this command applies to all linux, including RedHat, SUSE, Debian and other distributions.

2) execute cat / etc/issue, for example:

[root@localhost ~] # cat / etc/issue

CentOS release 5.5 (Final)

Kernel r on an m

3) execute cat / etc/redhat-release, for example:

[root@localhost ~] # cat / etc/redhat-release

CentOS release 5.5 (Final)

Check whether the system is 64-bit or 32-bit:

1 、 getconf LONG_BIT or getconf WORD_BIT

[root@localhost ~] # getconf LONG_BIT

sixty-four

2 、 file / bin/ls

[root@localhost ~] # file / bin/ls

/ bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

3. Lsb_release-a

[root@localhost] # lsb_release-a

LSB Version:: core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch

Distributor ID: CentOS

Description: CentOS release 5.5 (Final)

Release: 5.5

Codename: Final

4. Or use the method of viewing the file.

Vim / ect/issue

This is the end of the content of "where to view the CentOS version information". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report