Developers need to be familiar with common Linux commands version and kernel to view

Source: Internet
Author: User

When we need to install some software in Linux to download the installation file, we usually need to confirm which version of the installation package to download, in this case, we need to know what version and kernel our Linux system is. The common versions, kernel viewing commands, and files are as follows:
Version, uname, lsb_release, issue, RedHat-release;

View the kernel version:

[Admin @ mall_dev4 ~] $ CAT/proc/version
Linux version 2.6.9-67. elxenu (brewbuilder@ls20-bc1-14.build.redhat.com) (GCC version 3.4.6 20060404 (Red Hat 3.4.6-8) #1 SMP wed Nov 7 14:19:15 est 2007
[Admin @ mall_dev4 ~] $ Uname-
Linux mall_dev4 2.6.9-67. elxenu #1 SMP wed Nov 7 14:19:15 est 2007 i686 i686 i386 GNU/Linux

View the Linux version:

[Admin @ mall_dev4 ~] $ Lsb_release-
LSB version: core-3.0-ia32: core-3.0-noarch: graphics-3.0-ia32: graphics-3.0-noarch
Distributor ID: redhatenterpriseas
Description: Red Hat Enterprise Linux as Release 4 (nahant update 6)
Release: 4
Codename: nahantupdate6
[Admin @ mall_dev4 ~] $ CAT/etc/issue
Red Hat Enterprise Linux as Release 4 (nahant update 6)
Kernel/r on an/m
[Admin @ mall_dev4 ~] $ CAT/etc/RedHat-release
Red Hat Enterprise Linux as Release 4 (nahant update 6)
[Admin @ mall_dev4 ~] $ Rpm-Q RedHat-release
Redhat-release-4AS-7

Check whether Linux is 64-bit:
[Admin @ mall_dev4 ~] $ Getconf long_bit
32
[Admin @ mall_dev4 ~] $ File/bin/ls
/Bin/LS: Elf 32-bit LSB executable, Intel 80386, Version 1 (sysv), for GNU/Linux 2.2.5, dynamically linked (uses SHARED libs), stripped

When we need to install some software in Linux to download the installation file, we usually need to confirm which version of the installation package to download, in this case, we need to know what version and kernel our Linux system is. The common versions, kernel viewing commands, and files are as follows:
Version, uname, lsb_release, issue, RedHat-release;

View the kernel version:

[Admin @ mall_dev4 ~] $ CAT/proc/version
Linux version 2.6.9-67. elxenu (brewbuilder@ls20-bc1-14.build.redhat.com) (GCC version 3.4.6 20060404 (Red Hat 3.4.6-8) #1 SMP wed Nov 7 14:19:15 est 2007
[Admin @ mall_dev4 ~] $ Uname-
Linux mall_dev4 2.6.9-67. elxenu #1 SMP wed Nov 7 14:19:15 est 2007 i686 i686 i386 GNU/Linux

View the Linux version:

[Admin @ mall_dev4 ~] $ Lsb_release-
LSB version: core-3.0-ia32: core-3.0-noarch: graphics-3.0-ia32: graphics-3.0-noarch
Distributor ID: redhatenterpriseas
Description: Red Hat Enterprise Linux as Release 4 (nahant update 6)
Release: 4
Codename: nahantupdate6
[Admin @ mall_dev4 ~] $ CAT/etc/issue
Red Hat Enterprise Linux as Release 4 (nahant update 6)
Kernel/r on an/m
[Admin @ mall_dev4 ~] $ CAT/etc/RedHat-release
Red Hat Enterprise Linux as Release 4 (nahant update 6)
[Admin @ mall_dev4 ~] $ Rpm-Q RedHat-release
Redhat-release-4AS-7

Check whether Linux is 64-bit:
[Admin @ mall_dev4 ~] $ Getconf long_bit
32
[Admin @ mall_dev4 ~] $ File/bin/ls
/Bin/LS: Elf 32-bit LSB executable, Intel 80386, Version 1 (sysv), for GNU/Linux 2.2.5, dynamically linked (uses SHARED libs), stripped

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.