Chinaunix首页 | 论坛 | 博客
  • 博客访问: 532558
  • 博文数量: 59
  • 博客积分: 1169
  • 博客等级: 少尉
  • 技术积分: 572
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-01 18:03
个人简介

信息量太大,每天疲于辨别信息得真伪。

文章分类

全部博文(59)

文章存档

2016年(1)

2014年(9)

2013年(1)

2011年(48)

分类: LINUX

2011-09-15 13:15:42

用命令查询系统是32位还是64位
1.getconf LONG_BIT or getconf WORD_BIT
例如:
[root@sy02 /]# getconf LONG_BIT
64
2. file /bin/ls
/bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped

查看linux的版本主要有三种方法:
1) 登录到服务器执行 lsb_release -a ,即可列出所有版本信息,例如:

[root@localhost /]# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Release:        5.4
Codename:       Tikanga
[root@localhost /]#

这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
2) 登录到linux执行cat /etc/redhat-release ,例如如下:

[root@localhost /]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
[root@localhost /]#
这种方式下可以直接看到具体的版本号,比如 Tikanga

3)登录到linux执行rpm -q redhat-release ,例如如下

[root@localhost /]# rpm -q redhat-release
redhat-release-5Server-5.4.0.3
[root@localhost /]# 

这种方式下可看到一个所谓的release号

注意:第(2)(3)两种方法只对Redhat Linux有效
阅读(818) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~