zoukankan      html  css  js  c++  java
  • 【linux】查看Linux操作系统版本、内核、CPU和内存信息

    Date: 2018.5.31


    0、参考

    https://blog.csdn.net/SoaringLee_fighting/article/details/71755587
    https://www.cnblogs.com/vaelailai/p/7545166.html

    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
    
    2. 查看操作系统版本信息
    [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
    
    3. 查看发行版信息
    [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
    
    
    4. 查看cpu信息
    [root@localhost etc]# cat /proc/cpuinfo 
    
    5. 查看是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
    
    6. 查看内存信息
    cat /proc/meminfo
    

    THE END!

  • 相关阅读:
    win10 uwp 商业游戏 1.1.5
    PHP ftp_exec() 函数
    PHP ftp_delete() 函数
    PHP ftp_connect() 函数
    PHP ftp_close() 函数
    PHP ftp_chmod() 函数
    grant 之后是否要跟着 flush privileges
    [TJOI2015]概率论
    win10 uwp 商业游戏 1.1.5
    Total Commander 显示文件包含文件名扩展
  • 原文地址:https://www.cnblogs.com/SoaringLee/p/10532467.html
Copyright © 2011-2022 走看看