• 查看Linux系统信息


    1.查看内核

    [root@localhost etc]# uname -a
    Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux


    [root@localhost etc]# uname -r
    3.10.0-514.el7.x86_64

    [root@localhost etc]# cat /proc/version 
    Linux version 3.10.0-514.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Nov 22 16:42:41 UTC 2016

    2.查看发行版信息

    [root@lvs-slave ~]# cat /etc/issue

    CentOS release 6.7 (Final)
    Kernel on an m


    [root@localhost etc]# cat /etc/redhat-release 
    CentOS Linux release 7.3.1611 (Core)


    [root@localhost etc]# cat /etc/os-release |grep VERSION
    VERSION="7 (Core)"
    VERSION_ID="7"
    CENTOS_MANTISBT_PROJECT_VERSION="7"
    REDHAT_SUPPORT_PRODUCT_VERSION="7"


    [root@localhost etc]# lsb_release -a      前提是安装这个命令,yum install redhat-lsb,安装包很多,将近80M
    LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
    Distributor ID: CentOS
    Description: CentOS Linux release 7.3.1611 (Core) 
    Release: 7.3.1611
    Codename: Core


    3.查看cpu信息

    [root@localhost etc]# cat /proc/cpuinfo 

    4.查看是64位还是32位
    [root@localhost etc]# getconf LONG_BIT
    64


    [root@localhost etc]# file /bin/ls
    /bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=3d705971a4c4544545cb78fd890d27bf792af6d4, stripped

  • 相关阅读:
    java中文api 安装和引入eclipse
    【JAVA学习笔记】Java中的static关键字解析
    终于做好了JDBC在java和sql 2005之间的连接了 ,快哭了
    CF 5 A. Chat Server's Outgoing Traffic
    NYOJ 16 矩形嵌套
    poj 1061 青蛙的约会
    nefu 2 猜想
    nefu 120 梅森素数
    nefu 118 n!后面有多少个0
    nefu 117 素数个数的位数
  • 原文地址:https://www.cnblogs.com/fanren224/p/8457216.html
Copyright © 2020-2023  润新知