开发人员需要熟知的常用Linux命令Version、Kernel查看

当我们需要在Linux系统中安装一些软件而去下载安装文件时,一般都需要确认到底下载哪个版本的安装包,这就需要我们知道自己的Linux系统到底是什么版本、什么内核,常见的版本、内核查看命令或者文件有如下几个:

version、uname、lsb_release、issue、redhat-release;

查看内核版本:

[admin@mall_dev4 ~]$ cat /proc/version 
Linux version 2.6.9-67.ELxenU ([email protected]) (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 -a
Linux mall_dev4 2.6.9-67.ELxenU #1 SMP Wed Nov 7 14:19:15 EST 2007 i686 i686 i386 GNU/Linux

查看Linux版本:

[admin@mall_dev4 ~]$ lsb_release -a
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

查看Linux是否为64位:
[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


你可能感兴趣的:(开发人员需要熟知的常用Linux命令Version、Kernel查看)