1、/proc 文件夹 是内存信息不占用磁盘空间

lscpu    //查看cpu信息

     cat /proc/cpuinfo  //查看cpu信息

   cat /proc/meninfo  //  查看内存大小

   free //查看内存大小

lsblk  //查看硬盘

 cat  /proc /partitions   //查看硬盘

2、uname -r   //查看版本内核

      红帽系列 : cat /etc/os-release  // centos7\8 ubuntu 用这个命令查看版本儿

                        cat /etc/redhat-release   //cetnos6 查看

3、

[root@centos8 ~]#uname -r

4.18.0-147.el8.x86_64

[root@centos7 ~]#uname -r

3.10.0-1062.el7.x86_64

[root@centos6 ~]# uname -r

2.6.32-754.el6.x86_64

[root@ubuntu1804 ~]#uname -r

4.15.0-29-generic

#CentOS8 查看发行版本

[root@centos8 ~]#cat /etc/redhat-release

CentOS Linux release 8.1.1911 (Core)

[root@centos8 ~]#cat /etc/os-release

NAME="CentOS Linux"

VERSION="8 (Core)"

ID="centos"

ID_LIKE="rhel fedora"

VERSION_ID="8"

PLATFORM_ID="platform:el8"

PRETTY_NAME="CentOS Linux 8 (Core)"

ANSI_COLOR="0;31"

CPE_NAME="cpe:/o:centos:centos:8"

HOME_URL="https://www.centos.org/"

BUG_REPORT_URL="https://bugs.centos.org/"

范例:

CENTOS_MANTISBT_PROJECT="CentOS-8"

CENTOS_MANTISBT_PROJECT_VERSION="8"

REDHAT_SUPPORT_PRODUCT="centos"

REDHAT_SUPPORT_PRODUCT_VERSION="8"

[root@centos8 ~]#lsb_release -a

LSB Version: :core-4.1-amd64:core-4.1-noarch

Distributor ID: CentOS

Description: CentOS Linux release 8.1.1911 (Core)

Release: 8.1.1911

Codename: Core

[root@centos8 ~]#

#ubuntu查看发行版本

[root@ubuntu1804 ~]#cat /etc/os-release

NAME="Ubuntu"

VERSION="18.04.1 LTS (Bionic Beaver)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 18.04.1 LTS"

VERSION_ID="18.04"

HOME_URL="https://www.ubuntu.com/"

SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-

policy"

VERSION_CODENAME=bionic

UBUNTU_CODENAME=bionic

[root@ubuntu1804 ~]#cat /etc/is

iscsi/ issue issue.net

[root@ubuntu1804 ~]#cat /etc/is

iscsi/ issue issue.net

[root@ubuntu1804 ~]#cat /etc/issue

Ubuntu 18.04.1 LTS \n \l

[root@ubuntu1804 ~]#lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 18.04.1 LTS

Release: 18.04

Codename: bionic

[root@ubuntu1804 ~]#