如何查看linux 版本
2015-09-22 10:41
603 查看
1. 查看Linux内核版本命令:
1) linux:~ # cat /proc/version
Linux version 2.6.37.1-1.2-desktop (geeko@buildhost) (gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux) ) #1
SMP PREEMPT 2011-02-21 10:34:10 +0100
2) linux:~ # uname -a
Linux linux 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 i686 i686 i386 GNU/Linux
3) linux:~ # uname -r
2.6.37.1-1.2-desktop
2. 查看Linux版本:
1) 登录到服务器执行 lsb_release -a ,即可列出所有版本信息,如:
linux-zopi:~ # lsb_release -a
LSB Version: n/a
Distributor ID: SUSE LINUX
Description: openSUSE 11.4 (i586)
Release: 11.4
Codename: Celadon
注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
2) 登录到linux执行cat /etc/issue,如:
linux:~ # cat /etc/issue
Welcome to openSUSE 11.4 "Celadon" - Kernel \r (\l).
3) 登录到linux执行cat /etc/SuSE-release,如:
linux:~ # cat /etc/SuSE-release
openSUSE 11.4 (i586)
VERSION = 11.4
CODENAME = Celadon
注:在RedHat中此命令为“cat /etc/redhat-release”。
另外在Redhat Linux中还有如下查询命令:
4) 登录到linux执行rpm -q redhat-release,如:
[root@q1test01 ~]# rpm -q redhat-release
redhat-release-4AS-3
3. 查看Linux系统是32位还是64位:
linux$ >$ uname -m
若是i386 或 i686 则是32位kernel
x86_64 则是 64位kernel
1)、getconf LONG_BIT or getconf WORD_BIT
例如:
2)、file /bin/ls
例如:
查看linux的版本:
1) linux:~ # cat /proc/version
Linux version 2.6.37.1-1.2-desktop (geeko@buildhost) (gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux) ) #1
SMP PREEMPT 2011-02-21 10:34:10 +0100
2) linux:~ # uname -a
Linux linux 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 i686 i686 i386 GNU/Linux
3) linux:~ # uname -r
2.6.37.1-1.2-desktop
2. 查看Linux版本:
1) 登录到服务器执行 lsb_release -a ,即可列出所有版本信息,如:
linux-zopi:~ # lsb_release -a
LSB Version: n/a
Distributor ID: SUSE LINUX
Description: openSUSE 11.4 (i586)
Release: 11.4
Codename: Celadon
注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
2) 登录到linux执行cat /etc/issue,如:
linux:~ # cat /etc/issue
Welcome to openSUSE 11.4 "Celadon" - Kernel \r (\l).
3) 登录到linux执行cat /etc/SuSE-release,如:
linux:~ # cat /etc/SuSE-release
openSUSE 11.4 (i586)
VERSION = 11.4
CODENAME = Celadon
注:在RedHat中此命令为“cat /etc/redhat-release”。
另外在Redhat Linux中还有如下查询命令:
4) 登录到linux执行rpm -q redhat-release,如:
[root@q1test01 ~]# rpm -q redhat-release
redhat-release-4AS-3
3. 查看Linux系统是32位还是64位:
linux$ >$ uname -m
若是i386 或 i686 则是32位kernel
x86_64 则是 64位kernel
1)、getconf LONG_BIT or getconf WORD_BIT
例如:
2)、file /bin/ls
例如:
查看linux的版本:
相关文章推荐
- Linux下修改Mysql的用户(root)的密码
- linux之inode详解
- 9-17 linux进程查看和管理
- linux命令之磁盘空间
- 玩转MySQL之Linux下的简单操作(服务启动与关闭、启动与关闭、查看版本)
- Linux常用指令
- 常用linux命令备忘
- 一键清除Centos iptables 所有规则
- ioctl函数
- centos-7 最小安装 上网设置
- centos7 配置vnc
- CentOS配置
- CentOS配置
- CentOS iSCSI服务器搭建------LUN篇
- 远程访问linux环境安装图形界面问题解决汇总
- Centos6.x PPTPD 搭建方法,亲测有效
- Mysql Linux下的数据库自动备份
- 150922-写写博客监督下不自觉的自己-PPT,Linux,HTML
- linux Cron 执行Django 任务计划
- linux c 之 条件编译