下面介绍下在centos下硬件信息的查看,在Linux下查看需要用到各种命令,不像Windows上可以非常直观地看到。

查看所有硬件的信息

1)dmidecode

2)dmesg

Dmidecode 这款软件允许你在 Linux 系统下获取有关硬件方面的信息。Dmidecode 遵循 SMBIOS/DMI 标准,其输出的信息包括 BIOS、系统、主板、处理器、内存、缓存等等。

一般很少用这两个命令直接查看,因为这两个命令输出的信息非常多。一般会使用管道过滤出多需要的信息进行查看或通过-t选择指定的硬件查看信息。例如:[root@baby-centOS ~]# dmidecode | grep -i cpu

Socket Designation: CPU 1

Version: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz

Internal Reference Designator: J2B3 - CPU FAN

Description: CPU Internal Temperature

查看当前系统的版本,若是redhat,则查看的文件是/etc/redhat-release[root@baby-centOS ~]# cat /etc/centos-release

CentOS release 6.5 (Final)

查看当前系统是32位还是64位的[root@baby-centOS ~]# getconf LONG_BIT

64

CPU

1)通过lscpu查看cpu的统计信息[root@baby-centOS ~]# lscpu

Architecture:          x86_64                #cpu架构

CPU op-mode(s):        32-bit, 64-bit

Byte Order:            Little Endian

CPU(s):                4                     #逻辑cpu数

On-line CPU(s) list:   0-3

Thread(s) per core:    2                     #每个核心支持2个线程

Core(s) per socket:    2                     #每颗cpu两个核心

Socket(s):             1                     #总共一颗cpu

NUMA node(s):          1

Vendor ID:             GenuineIntel          #cpu生产厂商

CPU family:            6

Model:                 42

Stepping:              7

CPU MHz:               800.000

BogoMIPS:              4589.75

Virtualization:        VT-x                  #支持cpu虚拟化技术

L1d cache:             32K

L1i cache:             32K

L2 cache:              256K                  #2级缓存

L3 cache:              3072K                 #3级缓存

NUMA node0 CPU(s):     0-3

2)/proc/cpuinfo文件中可以看到cpu的型号和最高频率[root@baby-centOS ~]# cat /proc/cpuinfo

processor: 0

vendor_id: GenuineIntel

cpu family: 6

model: 42

model name: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz

stepping: 7

cpu MHz: 800.000

cache size: 3072 KB

......

3)也可以通过dmicecode命令通过-t选项指定cpu类型来查看(有更详细的信息)[root@baby-centOS ~]# dmidecode -t processor

# dmidecode 2.11

SMBIOS 2.6 present.

Handle 0x0004, DMI type 4, 42 bytes

Processor Information

Socket Designation: CPU 1

Type: Central Processor

Family: Core i5

Manufacturer: Intel

ID: A7 06 02 00 FF FB EB BF

Signature: Type 0, Family 6, Model 42, Stepping 7

Flags:

FPU (Floating-point unit on-chip)

VME (Virtual mode extension)

DE (Debugging extension)

PSE (Page size extension)

TSC (Time stamp counter)

MSR (Model specific registers)

PAE (Physical address extension)

MCE (Machine check exception)

CX8 (CMPXCHG8 instruction supported)

APIC (On-chip APIC hardware supported)

SEP (Fast system call)

MTRR (Memory type range registers)

PGE (Page global enable)

MCA (Machine check architecture)

CMOV (Conditional move instruction supported)

PAT (Page attribute table)

PSE-36 (36-bit page size extension)

CLFSH (CLFLUSH instruction supported)

DS (Debug store)

ACPI (ACPI supported)

MMX (MMX technology supported)

FXSR (FXSAVE and FXSTOR instructions supported)

SSE (Streaming SIMD extensions)

SSE2 (Streaming SIMD extensions 2)

SS (Self-snoop)

HTT (Multi-threading)

TM (Thermal monitor supported)

PBE (Pending break enabled)

Version: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz

Voltage: 1.1 V

External Clock: 100 MHz

Max Speed: 2300 MHz

Current Speed: 2300 MHz

Status: Populated, Enabled

Upgrade: Other

L1 Cache Handle: 0x0005

L2 Cache Handle: 0x0006

L3 Cache Handle: 0x0007

Serial Number: To Be Filled By O.E.M.

Asset Tag: To Be Filled By O.E.M.

Part Number: To Be Filled By O.E.M.

Core Count: 2

Core Enabled: 1

Thread Count: 2

Characteristics:

64-bit capable

内存

查看内存情况

1)[root@baby-centOS ~]# free -m

total       used       free     shared    buffers     cached

Mem:          3739        224       3514          0         15         79

-/+ buffers/cache:        129       3609

Swap:         4095          0       4095

2)[root@baby-centOS ~]# cat /proc/meminfo

MemTotal:        3828868 kB

MemFree:         3599240 kB

Buffers:           16096 kB

Cached:            80956 kB

SwapCached:            0 kB

Active:            44676 kB

Inactive:          74332 kB

Active(anon):      22288 kB

Inactive(anon):      424 kB

Active(file):      22388 kB

Inactive(file):    73908 kB

......

3)通过dmicecode命令通过-t选项指定memory来查看[root@baby-centOS ~]# dmidecode -t memory

# dmidecode 2.11

SMBIOS 2.6 present.

Handle 0x001D, DMI type 16, 15 bytes

Physical Memory Array

Location: System Board Or Motherboard

Use: System Memory

Error Correction Type: None

Maximum Capacity: 16 GB

Error Information Handle: Not Provided

Number Of Devices: 2

Handle 0x001E, DMI type 17, 28 bytes

Memory Device

Array Handle: 0x001D

Error Information Handle: 0x0000

Total Width: Unknown

Data Width: Unknown

Size: No Module Installed

Form Factor: DIMM

Set: None

Locator: DIMM_A

Bank Locator: BANK 0

Type: Unknown

Type Detail: None

Speed: Unknown

Manufacturer: Not Specified

Serial Number: Not Specified

Asset Tag: Not Specified

Part Number: Not Specified

Rank: Unknown

Handle 0x001F, DMI type 17, 28 bytes

Memory Device

Array Handle: 0x001D

Error Information Handle: 0x0000

Total Width: 64 bits

Data Width: 64 bits

Size: 4096 MB

Form Factor: SODIMM

Set: None

Locator: DIMM_B

Bank Locator: BANK 2

Type: DDR3

Type Detail: Synchronous

Speed: 1333 MHz

Manufacturer: 80CE

Serial Number: 21255F39

Asset Tag: 01112100

Part Number: M471B5273DH0-CH9

Rank: Unknown

上面显示了最大支持的内存大小:16G,一共有两个内存插槽,用了一个。以及内存的详细信息,包括内存类型,位宽,大小,频率.......

磁盘[root@baby-centOS ~]# lsblk

NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda       8:0    0 465.8G  0 disk

├─sda1    8:1    0   200M  0 part /boot

├─sda2    8:2    0    30G  0 part /usr

├─sda3    8:3    0     5G  0 part /

├─sda4    8:4    0     1K  0 part

├─sda5    8:5    0    50G  0 part /data

├─sda6    8:6    0    30G  0 part /usr/local

├─sda7    8:7    0    20G  0 part /var

├─sda8    8:8    0    10G  0 part /home

├─sda9    8:9    0    10G  0 part /tmp

└─sda10   8:10   0     4G  0 part [SWAP]

sr0      11:0    1  1024M  0 rom

可以看到各个分区的大小及挂载情况,比较直观,若要观察某个分区上的文件系统情况,可使用tune2fs -l /dev/sdax,当然这个不是硬件级别的查看了。[root@baby-centOS ~]# tune2fs -l /dev/sda5

tune2fs 1.41.12 (17-May-2010)

Filesystem volume name:

Last mounted on:

Filesystem UUID:          273a5dca-3d41-47e0-b48b-ebd7a1ae98ed

Filesystem magic number:  0xEF53

Filesystem revision #:    1 (dynamic)

Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize

Filesystem flags:         signed_directory_hash

Default mount options:    user_xattr acl

Filesystem state:         clean

......

若要查看更详细的硬盘和分区信息:[root@baby-centOS ~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes

255 heads, 63 sectors/track, 60801 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00032c3d

Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          26      204800   83  Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2              26        3942    31457280   83  Linux

/dev/sda3            3942        4595     5242880   83  Linux

/dev/sda4            4595       60802   451480576    5  Extended

/dev/sda5            4595       11122    52428800   83  Linux

/dev/sda6           11123       15039    31457280   83  Linux

/dev/sda7           15039       17650    20971520   83  Linux

/dev/sda8           17650       18955    10485760   83  Linux

/dev/sda9           18955       20261    10485760   83  Linux

/dev/sda10          20261       20783     4194304   82  Linux swap / Solaris

查看各分区的使用情况:[root@baby-centOS ~]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda3       5.0G  377M  4.4G   8% /

tmpfs           1.9G     0  1.9G   0% /dev/shm

/dev/sda1       194M   31M  153M  17% /boot

/dev/sda5        50G  775M   46G   2% /data

/dev/sda8       9.9G  151M  9.2G   2% /home

/dev/sda9       9.9G  151M  9.2G   2% /tmp

/dev/sda2        30G  5.0G   24G  18% /usr

/dev/sda6        30G  173M   28G   1% /usr/local

/dev/sda7        20G  2.3G   17G  12% /var

网卡

通过lspci查看pci设备,通过管道过滤就可以找到网卡信息[root@baby-centOS ~]# lspci | grep -i net

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)

09:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34)

Ethernet controller是有线网卡,Network controller是无线网卡。

可以用ethtool命令查看某个网络接口的详细信息[root@baby-centOS ~]# ethtool p1p1

Settings for p1p1:

Supported ports: [ TP MII ]

Supported link modes:   10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Supported pause frame use: No

Supports auto-negotiation: Yes

Advertised link modes:  10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Advertised pause frame use: Symmetric Receive-only

Advertised auto-negotiation: Yes

Link partner advertised link modes:  10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

Link partner advertised pause frame use: Symmetric

Link partner advertised auto-negotiation: Yes

Speed: 100Mb/s

Duplex: Full

Port: MII

PHYAD: 0

Transceiver: internal

Auto-negotiation: on

Supports Wake-on: pumbg

Wake-on: g

Current message level: 0x00000033 (51)

drv probe ifdown ifup

Link detected: yes

加上-i可查看网卡驱动:[root@baby-centOS ~]# ethtool -i p1p1

driver: r8169                              #这个就是驱动程序

version: 2.3LK-NAPI

firmware-version: rtl_nic/rtl8105e-1.fw

bus-info: 0000:05:00.0

supports-statistics: yes

supports-test: no

supports-eeprom-access: no

supports-register-dump: yes

supports-priv-flags: no

若要查看所有的网络接口(ip link show,ifocnfig -a):[root@baby-centOS ~]# ip link show

1: lo:  mtu 16436 qdisc noqueue state UNKNOWN

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

2: p1p1:  mtu 1500 qdisc pfifo_fast state UP qlen 1000

link/ether 18:03:73:66:66:ee brd ff:ff:ff:ff:ff:ff

3: wlan0:  mtu 1500 qdisc mq state DOWN qlen 1000

link/ether ac:72:89:04:ea:84 brd ff:ff:ff:ff:ff:ff[root@baby-centOS ~]# ifconfig

br0       Link encap:Ethernet  HWaddr 18:03:73:66:66:EE

inet addr:192.168.0.165  Bcast:192.168.0.255  Mask:255.255.255.0

inet6 addr: fe80::1a03:73ff:fe66:66ee/64 Scope:Link

.......

查看所有pci设备信息(-v[详细信息],-vv[更详细信息]):[root@baby-centOS ~]# lspci

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)          #主板芯片

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)

00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)                   #usb控制器

00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)                    #声卡

00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)                               #pci插槽

00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)

00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)

00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)

00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5)

00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)

00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC Controller (rev 05)

00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)                      #硬盘接口

00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)

01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev a1)                      #显卡

01:00.1 Audio device: NVIDIA Corporation GF108 High Definition Audio Controller (rev a1)                     #声卡

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)             #有线网卡

09:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34)                                           #无线网卡

0b:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)[root@baby-centOS ~]# dmidecode -t af

Invalid type keyword: af

Valid type keywords are:

bios

system

baseboard

chassis

processor

memory

cache

connector

slot

也可以通过dmidecode命令指定上面的这些硬件来查看相关信息!!!

linux硬件信息在哪个目录下,Linux 查看系统硬件信息相关推荐

  1. linux中的文件夹压缩文件,linux将文件拷贝到目录下Linux下文件的压缩与打包详解...

    在Linux中,有很多的压缩命令.利用这些压缩命令,可以方便的从网络上下载大型的文件.同时,我们知道,Linux文件的扩展名是没有特殊意义的,不过,因为Linux下存在着许多压缩命令,所以为了方便记忆 ...

  2. 【UEFI实战】OS下如何查看系统相关信息

    说明 本文主要介绍OS下如何来查看系统信息,这些系统信息大多是通过BIOS上传的.这里的OS主要分为Linux和Windows两个部分来说明,前者使用的发行版系统是Ubuntu18.04,后者使用的是 ...

  3. linux 获取上两级目录下,Linux系统目录大小通过du命令获取实例

    使用过 Linux 系统的小伙伴都知道应该都知道, Linux 系统下的 ls 命令通常被我们用来查看文件目录的内容,但是不知道大家有没有细心留意,ls 命令所显示出来的每一个目录的大小竟然都只有 4 ...

  4. linux中grep命令查找目录下,linux中查找grep与find命令的使用

    在日常工作中,我们常常会在自己的电脑寻找某些不知道放在哪里的私密文件,通常我们会在资源管理器的搜索栏里输入一些关键字去帮助我们快速去定位查找该文件.在linux系统中也有这样的功能,只不过在linux ...

  5. linux将光驱挂载到目录下,Linux操作系统下关于光驱的挂载

    Linux操作系统下关于光驱的挂载 Linux将每一个物理设备都映射成了一个文件,这些文件都放在了/dev文件(linux中目录也是文件)下面,光驱映射成的文件就是一个名为cdrom的文件.mount ...

  6. linux脚本一般放在哪个目录下,Linux Deepin 将脚本放在个人目录下直接执行

    在 Linux Deepin 下,如何将 Bash 脚本放在个人目录下并能够不指定路径而直接执行脚本? 今天我们就以这个问题作为切入点,继续讲一下 Bash 的一些基础知识. 现在,我们打开文本编辑器 ...

  7. linux查找文件 在哪个目录下,linux查找文件在哪个文件夹

    linux查找文件在哪个文件夹 linux下查找文件可以使用find命令 例如:find / -name tnsnames.ora 查到:/opt/app/oracle/product/10.2/ne ...

  8. Linux中bashrc在哪个目录下,Linux 在bash.bashrc中添加 一个目录

    1.   在/etc/bash.bashrc 文件最后添加如下 PATH=/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin #P ...

  9. 9个Linux 查看系统硬件信息命令(实例详解)

    在Linux下,我们精要遇到需要查看系统的硬件信息, 这里我罗列了查看系统硬件信息的实用命令,并做了分类,实例解说. 执行环境:ubuntu 16.04 1. cpu lscpu命令,查看的是cpu的 ...

最新文章

  1. 常用的数据分析图表及方法介绍
  2. rand(),srand()产生随机数
  3. [转]使用 LDAP 组或角色限制访问,包含部分单点登录SSO说明
  4. Java JDBC PreparedStatement类
  5. 没有它,我们寸步难行——LBS的渊源与实践
  6. dojo省份地市级联之省份封装类(一)
  7. 微软补丁服务器部署方案,Windows server 2012 r2 单wsus部署成功,需要更新补丁的服务器已有域控该怎么出解决方案...
  8. 【光学】Matlab模拟相互垂直的光波叠加
  9. 计算任意2个日期内的工作日(没有考虑到国定假日
  10. cad编辑节点快捷键是什么_CAD常用的快捷键命令
  11. vue 刷新、重新加载app
  12. 服装管理系统总体概述
  13. eas bos客户端获取组织,人员,用户的方法
  14. 2022Q3消费级AR眼镜市场季度分析:国产品牌纷纷发力,市场全面启航
  15. 无线地磁传感器更适合路边停车系统
  16. 当steam教育加入教学大纲之时
  17. 计蒜客/阿里的新游戏
  18. linux教程:查看端口占用情况及开放关闭端口
  19. fifa足球世界微信多少服务器,FIFA足球世界 微信登录版
  20. 计算机游戏配机方案,主流电脑装机方案,日常娱乐游戏流畅不卡顿,小白装机可以参考...

热门文章

  1. python2.7运行报警告:UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode
  2. 华为吹响“伙伴暨开发者”集结号:共赢数字时代
  3. 非线性回归分析及其Matlab实现
  4. python疫苗预约系统毕业设计开题报告
  5. 推荐系统实践(五)----基于图的推荐算法
  6. Instrument 之 time Profiler
  7. 一元二次方程解法(待更新……)
  8. 2019XUPT_ACM校赛总结
  9. 东秦OJ_1841: 超级密码
  10. python pygame 简单小游戏