1. uname -a
2. cat /proc/version
3. cat /etc/issue
4. lsb_release -a
详解 lsb_release -a
登录到服务器执行 lsb_release -a ,即可列出所有版本信息,例如:
1. [root@3.5.5Biz-46 ~]# lsb_release -a
2. LSB Version: 1.3
3. Distributor ID: RedHatEnterpriseAS
4. Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
5. Release: 4
6. Codename: NahantUpdate1
7. [root@3.5.5Biz-46 ~]#
这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
查看redhat的release版本
查看redhat的release版本
#more /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
#more /etc/issue
# more /proc/version
查看CPU信息
#grep "model name" /proc/cpuinfo
#more /proc/cpuinfo
查看CPU位数(32 or 64)
#getconf LONG_BIT
查看内存信息
#more /proc/meminfo
#grep MemTotal /proc/meminfo
查看libc、gcc版本
#ldd /sbin/mii-tool
#rpm -qa | grep glibc
#gcc –v
查看Ubuntu版本
方法一
在终端中执行下列指令:
cat /etc/issue
可以查看当前正在运行的 Ubuntu 的版本号。其输出结果类似下面的内容:
Ubuntu 7.04 \n \l
方法二
使用 lsb_release 命令也可以查看 Ubuntu 的版本号,与方法一相比,内容更为详细。执行指令如下
:
sudo lsb_release -a
将输出结果:
Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04
Codename: feisty
查看freebsd版本
uname -a
因篇幅问题不能全部显示,请点此查看更多更全内容