Linux 查看OS Type方法
2010-12-09 16:30
239 查看
由于需要在不同的linux 平台上跑build,鉴于平台之间的差异,需要判断各个平台的OS版本来区分具体的操作。
检查查了下linux 查看系统版本的几种方法。还不少!嘿嘿
Linux 查看系统版本的几种方法:
(1)uname -a
Linux pmx02r4****** 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
(2)cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant)
Kernel \r on an \m
(3)cat /proc/version
Linux version 2.6.9-5.ELsmp (bhcompile@decompose.build.redhat.com) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 EST 2005
(4)lsb_release -a
LSB Version: 1.3
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant)
Release: 4
Codename: Nahant
UNAME(1) User Commands UNAME(1)
NAME
uname - print system information
SYNOPSIS
uname [OPTION]...
DESCRIPTION
Print certain system information. With no OPTION, same as -s.
-a, --all
print all information, in the following order:
-s, --kernel-name
print the kernel name
-n, --nodename
print the network node hostname
-r, --kernel-release
print the kernel release
检查查了下linux 查看系统版本的几种方法。还不少!嘿嘿
Linux 查看系统版本的几种方法:
(1)uname -a
Linux pmx02r4****** 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
(2)cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant)
Kernel \r on an \m
(3)cat /proc/version
Linux version 2.6.9-5.ELsmp (bhcompile@decompose.build.redhat.com) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 EST 2005
(4)lsb_release -a
LSB Version: 1.3
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant)
Release: 4
Codename: Nahant
UNAME(1) User Commands UNAME(1)
NAME
uname - print system information
SYNOPSIS
uname [OPTION]...
DESCRIPTION
Print certain system information. With no OPTION, same as -s.
-a, --all
print all information, in the following order:
-s, --kernel-name
print the kernel name
-n, --nodename
print the network node hostname
-r, --kernel-release
print the kernel release
相关文章推荐
- 查看Linux系统版本主要采用哪些方法
- linux中查看日志的方法
- 6种查看Linux进程占用端口号的方法详解
- linux下动态库&静态库查看方法
- linux,apache,php,mysql常用的查看版本信息的方法
- Linux下查看Mysql数据库端口的方法
- Linux下查看软、硬raid信息的方法
- linux 常用查看网络连接方法及脚本
- [Linux] Linux查看端口使用状态、关闭端口方法
- Linux 查看内存插槽数、最大容量的方法
- LINUX手动查看和修改MTU值的方法
- 基于Linux系统中查看硬件等信息的方法详解
- Linux下查看内存使用情况的方法总结
- linux下查看用户及用户组的方法
- Linux环境变量的设置和查看方法
- 在Linux操作系统下查看磁盘空间的方法
- Linux的CPU、内存、磁盘查看方法
- Linux查看文件内容的方法(cat,tac,more,less,head,tail)
- Linux环境变量的设置和查看方法
- 查看Linux版本系统信息方法汇总