Five methods to view Linux system information, such as Ubuntu/Redhat
Source: Internet
Author: User
Five methods to view Ubuntu, Redhat, and other Linux system version numbers and other system information recently encountered a problem. how can I view the current operating system and version on a Linux Terminal. Different Linux distributions are not exactly the same. I checked some information and summarized it as follows. You can view the following commands...
Five methods to view Ubuntu, Redhat, and other Linux system version numbers and other system information recently encountered a problem. how can I view the current operating system and version on a Linux Terminal. Different Linux distributions are not exactly the same. I checked some information and summarized it as follows. The first method is # lsb_release-aLSB Version: core-4.0-ia32: core-4.0-noarch: graphics-4.0-ia32: graphics-4.0-noarch: printing-4.0-ia32: printing-4.0-noarchDistributor: ID: CentOSDescription: CentOS release 5.7 (Final) Release: 5.7 Codename: Final www.2cto.com is applicable to all linux systems that comply with LSB specifications, including Redhat, SuSE, Debian, Ubuntu, and Centos. The following command does not display the current system name and version, but displays the system core information. Root @ MyMail ~ # UnameLinuxroot @ MyMail ~ # Uname-r2.6.18-164. el5 [root @ localhost ~] # Uname-aLinux 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 applicable to RedHat, CentOS root @ MyMail ~ # Cat/etc/redhat-releaseCentOS release 5.7 (Final) log on to linux and run rpm-q redhat-release # rpm-q redhat-release or CentOS root @ MyMail ~ # Rpm-q centos-releasecentos-release-5-7.el5.centos.1 www.2cto.com fourth method: the current centos version and redhat corresponding version of the command in centos is not accurate, the displayed system and version is also Red Hat 3.4.6-10. # Cat/proc/versionLinux 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 and this command is used on Ubuntu, the display shows that it is Ubuntu, but not the version. Last method: # run cat/etc/issue in CentOS: CentOS release 5.7 (Final) Kernel \ r on an \ m www.2cto.com or: ubuntu 11.04 \ n \ l allows you to view the version number of the currently running Ubuntu.
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