1. uname -a

you will view  kernel name、network node hostname、kernel release、kernel version、machine hardware name、processor type 、hardware platform、operating system

2. cat /proc/version

his file will not show you the name of the actual OS release, but will instead give you specifics about the version of Linux kernel used in your distribution, and confirm the version of a GCC compiler used to build it.

If you cat the /proc/version file, this is what you're going to see (I'm using a CentOS 5.4 system for this):

cat /proc/version

Linux version 2.6.18-164.11.1.el5 (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Jan 20 07:39:04 EST 2010

In this output, you get to see the following information:

Exact version of the Linux kernel used in your OS: Linux version 2.6.18-164.11.1.el5

Name of the user who compiled your kernel, and also a host name where it happened: mockbuild@builder16.centos.org

Version of the GCC compiler used for building the kernel: gcc version 4.1.2 20080704

Type of the kernel – SMP here means Symmetric MultiProcessing kernel, the one that supports systems with multiple CPUs or multiple cpu cores

Date and time when the kernel was built: Wed Jan 20 07:39:04 EST 2010

3. cat /etc/issue

Catting /proc/version or uname will only show you information that has been set for compile into the kernel. Only the major distributions will put some special marks for identification, in the form such as custom kernel version tag or gcc version string. But this is not necessarily true especially if the kernel is a self compiled kernel.

For example, here is the /proc/version from my Slackware server:

4. lsb_release -a

这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版,但不能查看系统位数。

5.如果你知道你的操作系统是什么,但不确定具体版本,下面有几种方法你可以使用

不同的 UNIX-like 操作系统根据他们的发行版本不同而存储信息不同

RedHat Linux

bash-3.1$ cat /etc/redhat-release
Red Hat Enterprise Linux Client release 5 (Tikanga)

Ubuntu Linux

bash-3.1$ cat /etc/issue
Ubuntu 6.10 n l

SUSE Linux

~> cat /etc/SuSE-release
SUSE Linux Enterprise Desktop 10 (x86_64)
VERSION = 10

Sun Solaris

bash-2.03$ cat /etc/release
Solaris 8 2/04 s28s_hw4wos_05a SPARC
Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
Assembled 08 January 2004

linux查看系统版本和系统位数的更多相关文章

  1. linux查看内核版本、系统版本、系统位数(32or64)

     linux查看内核版本.系统版本.系统位数(32or64) 2011-05-01 22:05:12 标签:linux 内核版本 休闲 系统版本 系统位数 1. 查看内核版本命令: 1) [root@ ...

  2. Linux—查看内核版本、系统版本、系统位数

    一.查看内核版本命令: 1) [root@q1test01 ~]# cat /proc/version   Linux version 2.6.9-22.ELsmp (bhcompile@crowe. ...

  3. linux查看操作系统版本信息

    linux查看操作系统版本信息  摘自:https://www.cnblogs.com/vaelailai/p/7545166.html 一.linux下如何查看已安装的centos版本信息: 1.L ...

  4. Linux 查看操作系统版本信息 uname

    Linux 查看操作系统版本信息 uname uname 命令用于显示当前系统的版本信息. 带 -a 选项的 uname 命令会给出当前操作系统的所有有用信息. 命令如下: [root@node1 / ...

  5. Linux查看PCIe版本及速率

    Linux查看PCIe版本及速率 PCIE有四种不同的规格,通过下图来了解下PCIE的其中2种规格 查看主板上的PCI插槽 # dmidecode | grep --color "PCI&q ...

  6. 【转载】Linux查看PCIe版本及速率【方法】PCIE的X4X8X16 查看 数量 怎么看

    Linux查看PCIe版本及速率   PCIE有四种不同的规格,通过下图来了解下PCIE的其中2种规格   查看主板上的PCI插槽 # dmidecode | grep --color "P ...

  7. Linux查看操作系统版本的几种方式

    Linux查看操作系统版本的几种方式: 1.uname -a 2.lsb_release -a 3.cat /etc/issue 4.cat /proc/version 5.cat /etc/redh ...

  8. Linux 查看Tomcat版本信息

    Linux 查看Tomcat版本信息 如果我们想运行在 Linux 下的 Tomcat 版本信息,只需要在 Tomcat 的 bin/ 目录下,运行 version.sh 脚本即可. 1.使用如下命令 ...

  9. Linux查看PCIe版本及速率# lspci -vvv |grep Width -i

    Linux查看PCIe版本及速率 https://www.cnblogs.com/lsgxeva/p/9542975.html# lspci -vvv |grep Width -i # lspci | ...

  10. CentOS 7系统查看系统版本和机器位数

    前言 由于不经常使用linux,每当使用的时候就是安装软件,安装软件的时候就要选择安装包平台,是32位的还是64位的.这时候突然发现不知道怎么查,于是百度.虽然轻而易举百度出来,但仍旧没有自己的笔记看 ...

随机推荐

  1. matlab 聚类

    目前已知matlab的聚类方法有三种: 一.利用 clusterdata函数对样本数据进行一次聚类,其缺点为可供用户选择的面较窄,不能更改距离的计算方法: 二.层次聚类,该方法较为灵活,需要进行细节了 ...

  2. SQL笔记 - CTE递归实例:显示部门全称

    昨天在整理JS的Function时,示例是一个递归函数.说起递归,想起前段时间在搞CTE,那个纠结呀,看似容易,可我总抓不住门道,什么递归条件,什么结束条件,一头雾水...今天一大早就爬起来,果然不负 ...

  3. 前端入门级之如何从零开始前端(估计要被人鄙视成LOW货了)入门篇

    <!------------------------------------------------------基本说明开始----------------------------------- ...

  4. php防注入

    引发 SQL 注入攻击的主要原因,是因为以下两点原因: 1. php 配置文件 php.ini 中的 magic_quotes_gpc选项没有打开,被置为 off 2. 开发者没有对数据类型进行检查和 ...

  5. PHP 如何显示大数字,防止显示为 科学计数法 形式

    PHP 数字超过一定长度时,会自动转换为 科学计数法 的形式,如 1.2345678912346E+16: 如何 避免转换,让它原样展示呢? 不过,可以用PHP函数 number_format() 来 ...

  6. Mac Pro 安装 Adobe Photoshop CC for mac V2014 破解版

    一.下载 Photoshop CC for mac V2014 原版(.dmg 文件): 百度网盘下载1 百度网盘下载2 百度网盘下载3 百度网盘下载4 百度网盘下载5 百度网盘下载6 百度网盘下载7 ...

  7. appid 评价

    //apple api #define kAppAppleId         @"980883989" #define kAppRateUrl         @"it ...

  8. lua练手基础

    lua的库文件地址: http://luaforge.net/projects/lua官网 http://lua.org --[[ print string. multiple line commen ...

  9. Redhat EL安装curses

    1.下载curses安装包 http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz2. tar -zxvf  nurses-5.6.tar.gz 3 ...

  10. cocos2d内存管理

    设想如下场景, 这是一个典型的内存合理分配的场景: 在一帧内, 有若干个函数, 每个函数都会创建一系列的精灵, 每个精灵都不同, 都会占用一定的内存, 精灵的总数可能会有1000个, 而一个函数只会创 ...