乱七八糟想到什么记什么8
作者:互联网
常见命令
查看硬件信息
查看cpu
lscpu命令可以查看cpu信息
cat /proc/cpuinfo也可看查看到
内存
cat /proc/meminfo
proc文件夹里有好多东西
proc是内存中的数据不占磁盘空间
硬盘
lsblk
cat /proc/partitions
查看软件
查看内核版本
uname -r
查看操作系统版本
红帽系列的都可以通过redhat-release来看
cat /etc/redhat-release
示例
[16:47:57 root@C8[ network-scripts]#uname -r
4.18.0-147.el8.x86_64
[17:37:01 root@C8[ network-scripts]#cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)
[17:39:07 root@C8[ network-scripts]#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"
[10:10:16 2u@u20[ /]$uname -r
5.4.0-28-generic
[10:26:45 2u@u20[ /]$cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.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=focal
UBUNTU_CODENAME=focal
标签:什么,centos,URL,乱七八糟,想到,cat,VERSION,release,ID 来源: https://www.cnblogs.com/bpzblog/p/12814311.html