在linux系统终端查看硬件信息

使用如下命令查看包括CPU、内存、硬盘、主板在内的各种硬件相关的信息

  • CPU型号

    1
    cat /proc/cpuinfo | grep "model name" | uniq
  • 查看CPU物理个数

    1
    cat /proc/cpuinfo | grep "physical id" | uniq | wc -l
  • 查看内存信息

    1
    2
    3
    # 先安装工具软件,以archlinux为例
    sudo pacman -S dmidecode
    sudo dmidecode -t memory | grep Size
  • 查看内存条厂家

    1
    sudo dmidecode -t memory | grep Manufacturer
  • 查看硬盘信息

    1
    fdisk -l | grep "Disk /dev/sd"
  • 查看主板信息

    1
    sudo dmidecode | grep -A16 "System Information$"

在linux系统终端查看硬件信息

http://kylepeng93.github.io/2021/10/05/hardware-info-cmd/

作者

彭凯

发布于

2021-10-05

更新于

2021-10-06

许可协议

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

评论

You forgot to set the shortname for Disqus. Please set it in _config.yml.