菜鸟笔记
提升您的技术认知

如何查询centos查看系统内核版本,系统版本,32位还是64位-ag真人游戏

查看centos内核的版本:

1)[root@localhost ~]# 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: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 x86_64 x86_64 gnu/linux

3)

[root@localhost ~]# uname -r

2.6.18-194.el5

2. 查看linux版本:

1) 列出所有版本信息,

[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

注:这个命令适用于所有的linux,包括redhat、suse、debian等发行版。

2) 执行cat /etc/issue,例如如下:

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

centos release 5.5 (final)

kernel r on an m

3) 执行cat /etc/redhat-release ,例如如下:

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

centos release 5.5 (final)

查看系统是64位还是32位:

1、getconf long_bit or getconf word_bit

[root@localhost ~]# getconf long_bit

64

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

网站地图