在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美1级

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內(nèi)不再提示

9個Linux中查看系統(tǒng)硬件信息的實用命令

Linux愛好者 ? 來源:一口Linux ? 作者:一口Linux ? 2021-04-25 14:46 ? 次閱讀

Linux下,我們經(jīng)常需要查看系統(tǒng)的硬件信息, 這里我羅列了查看系統(tǒng)硬件信息的實用命令,并做了分類,實例解說。

執(zhí)行環(huán)境:ubuntu 16.04

1. cpu

lscpu命令,查看的是cpu的統(tǒng)計信息。

root@ubuntu:/home/peng/# lscpu

Architecture: x86_64 #cpu架構

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

Byte Order: Little Endian #小尾序

CPU(s): 1 #總共有1核

On-line CPU(s) list: 0

Thread(s) per core: 1 #每個cpu核,只能支持一個線程,即不支持超線程

Core(s) per socket: 1

Socket(s): 1

NUMA node(s): 1

Vendor ID: GenuineIntel #cpu產(chǎn)商 intel

CPU family: 6

Model: 158

Model name: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz

Stepping: 9

CPU MHz: 3408.070

BogoMIPS: 6816.14

Hypervisor vendor: VMware

Virtualization type: full #支持cpu虛擬化技術

L1d cache: 32K

L1i cache: 32K

L2 cache: 256K

L3 cache: 6144K

NUMA node0 CPU(s): 0

查看/proc/cpuinfo,可以知道每個cpu信息,如每個CPU的型號,主頻等。

root@ubuntu:/home/peng# cat /proc/cpuinfo

processor : 0

vendor_id : GenuineIntel

cpu family : 6

model : 158

model name : Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz

stepping : 9

microcode : 0x48

cpu MHz : 3408.070

cache size : 6144 KB

physical id : 0

siblings : 1

core id : 0

cpu cores : 1

apicid : 0

initial apicid : 0

fpu : yes

fpu_exception : yes

cpuid level : 22

wp : yes

。..。.

2. 內(nèi)存

概要查看內(nèi)存情況

root@ubuntu:/home/peng# free -m

total used free shared buff/cache available

Mem: 1970 702 315 13 952 1025

Swap: 974 20 954

這里的單位是MB,總共的內(nèi)存是1970MB。

查看內(nèi)存詳細使用

root@ubuntu:/home/peng# cat /proc/meminfo

MemTotal: 2017516 kB

MemFree: 242020 kB

MemAvailable: 1003240 kB

Buffers: 104192 kB

Cached: 699824 kB

SwapCached: 1832 kB

Active: 696320 kB

Inactive: 639924 kB

Active(anon): 236412 kB

Inactive(anon): 301996 kB

Active(file): 459908 kB

Inactive(file): 337928 kB

Unevictable: 48 kB

Mlocked: 48 kB

。..。.

查看內(nèi)存硬件信息

root@ubuntu:/home/peng# dmidecode -t memory

# dmidecode 3.0

Getting SMBIOS data from sysfs.

SMBIOS 2.7 present.

Handle 0x0084, DMI type 5, 46 bytes

Memory Controller Information

Error Detecting Method: None

Error Correcting Capabilities:

None

Supported Interleave: One-way Interleave

Current Interleave: One-way Interleave

Maximum Memory Module Size: 32768 MB

Maximum Total Memory Size: 491520 MB

Supported Speeds:

70 ns

60 ns

Supported Memory Types:

FPM

EDO

DIMM

SDRAM

Memory Module Voltage: 3.3 V

Associated Memory Slots: 15

。..。.

內(nèi)存最大值是 491520 MB。

3. 磁盤

查看硬盤和分區(qū)分布

root@ubuntu:/home/peng# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sr0 11:0 1 1024M 0 rom

sda 8:0 0 500G 0 disk

├─sda2 8:2 0 1K 0 part

├─sda5 8:5 0 975M 0 part [SWAP]

└─sda1 8:1 0 499G 0 part /

查看硬盤和分區(qū)的詳細信息

root@ubuntu:/home/peng# fdisk -l

Disk /dev/sda: 500 GiB, 536870912000 bytes, 1048576000 sectors

Units: sectors of 1 * 512 = 512 bytes

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

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

Disklabel type: dos

Disk identifier: 0x9c674a44

Device Boot Start End Sectors Size Id Type

/dev/sda1 * 2048 1046575103 1046573056 499G 83 Linux

/dev/sda2 1046577150 1048573951 1996802 975M 5 Extended

/dev/sda5 1046577152 1048573951 1996800 975M 82 Linux swap / Solaris

4. 網(wǎng)卡

查看網(wǎng)卡硬件信息

root@ubuntu:/home/peng# lspci | grep -i ‘eth’

02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)

查看系統(tǒng)的所有網(wǎng)絡接口

root@ubuntu:/home/peng# ifconfig -a

ens33 Link encap:Ethernet HWaddr 0029bd:40

inet addr:192.168.0.117 Bcast:192.168.0.255 Mask:255.255.255.0

inet6 addr: fe80:55482ef/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:174629 errors:0 dropped:0 overruns:0 frame:0

TX packets:105285 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:237519396 (237.5 MB) TX bytes:9592767 (9.5 MB)

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:65536 Metric:1

RX packets:854 errors:0 dropped:0 overruns:0 frame:0

TX packets:854 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:60894 (60.8 KB) TX bytes:60894 (60.8 KB)

或者是

root@ubuntu:/home/peng# ip link show

1: lo: 《LOOPBACK,UP,LOWER_UP》 mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000

link/loopback 000000:00 brd 000000:00

2: ens33: 《BROADCAST,MULTICAST,UP,LOWER_UP》 mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000

link/ether 0029bd:40 brd ffffff:ff

或者

f075930e-a533-11eb-aece-12bb97331649.png

如果要查看某個網(wǎng)絡接口的詳細信息,例如ens33的詳細參數(shù)和指標

【有的ubuntu網(wǎng)口是eth0】

root@ubuntu:/home/peng# ethtool ens33

Settings for ens33:

Supported ports: [ TP ]

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

100baseT/Half 100baseT/Full #支持千兆半雙工,全雙工模式

1000baseT/Full

Supported pause frame use: No

Supports auto-negotiation: Yes #默認使用自適應模式

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

100baseT/Half 100baseT/Full

1000baseT/Full

Advertised pause frame use: No

Advertised auto-negotiation: Yes

Speed: 1000Mb/s #網(wǎng)卡的速度是1000Mb

Duplex: Full #全雙工

Port: Twisted Pair

PHYAD: 0

Transceiver: internal

Auto-negotiation: on

MDI-X: off (auto)

Supports Wake-on: d

Wake-on: d

Current message level: 0x00000007 (7)

drv probe link

Link detected: yes #表示有網(wǎng)線連接,和路由是通的

5. pci

查看pci信息,即主板所有硬件槽信息。

root@ubuntu:/home/peng# lspci

00:00.0 Host bridge: Intel Corporation 82845 845 (Brookdale) Chipset Host Bridge (rev 04)

00:01.0 PCI bridge: Intel Corporation 82845 845 (Brookdale) Chipset AGP Bridge(rev 04)

00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #1) (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #2) (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 42)

00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 02)

00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 (rev 02)

00:1f.3 SMBus: Intel Corporation 82801CA/CAM SMBus Controller (rev 02)

00:1f.5 Multimedia audio controller:Intel Corporation 82801CA/CAM AC‘97 Audio Controller (rev 02)

00:1f.6 Modem: Intel Corporation 82801CA/CAM AC’97 Modem Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 420 Go](rev a3)

02:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller(rev 46)

02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+(rev 10)

02:04.0 CardBus bridge: O2 Micro, Inc. OZ6933 Cardbus Controller (rev 01)

02:04.1 CardBus bridge: O2 Micro, Inc. OZ6933 Cardbus Controller (rev 01)

由上述的 輸出可以看到,我的電腦上共有3個PCI總線(0號,1號,2號)。在單個系統(tǒng)上,插入多個總線是通過橋(bridge)來完成的,橋是一種用來連接總線 的特殊PCI外設。所以,PCI系統(tǒng)的整體布局組織為樹型,我們可以通過上面的lspci輸出,來畫出我的電腦上的PCI系統(tǒng)的樹型結構:

00:00.0(主橋)--00:01.0(PCI橋)-----010(nVidia顯卡)

|

|---00:1d(USB控制器)--000(USB1號控制器)

| |

| |--001(USB2號控制器) |

|-000(PCI橋)--02:00.0(IEEE1394)

| |

| |-02:01.0(8139網(wǎng)卡)

| |

| |-02:04(CardBus橋)-02:04.0(橋1)

| |

| |--02:04.1(橋2)

|

|-00:1f(多功能板卡)-000(ISA橋)

|

|--001(IDE接口)

|

|--003(SMBus)

|

|--005(多媒體聲音控制器)

|

|--006(調(diào)制解調(diào)器)

由上圖可以得出,我的電腦上共有8個PCI設備,其中0號總線上(主橋)上連有4個,1號總線上連有1個,2號總線上連有3個。00:1f是一個連有5個功能的多功能板卡。

如果要更詳細的信息:

lspci -v 或者 lspci -vv

如果要看設備樹:lscpi -t

root@ubuntu:/home/peng# lspci -t

6. usb

查看usb信息

root@ubuntu:/home/peng# lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub

Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

lsusb -t查看系統(tǒng)中的USB拓撲,類似cat /sys/kernel/debug/usb/devices

root@ubuntu:/home/peng# lsusb -t

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M

|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M

|__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/7p, 12M

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M

/var/lib/usbutils/usb.ids還保存了很多設備商的VID信息

root@ubuntu:/home/peng# cat /var/lib/usbutils/usb.ids | grep King

7778 Counterfeit flash drive [Kingston]

0100 Kingston Flash Drive (128MB)

c010 Kingston FCR-HS2/ATA Card Reader

07cb Kingmax Technology, Inc.

4100 Kingsun SF-620 Infrared Adapter

4959 Kingsun KS-959 Infrared Adapter

0015 Kingston DataTraveler ELITE

0016 Kingston DataTraveler U3

0998 Kingston Data Traveler2.0 Disk Driver

0999 Kingston Data Traveler2.0 Disk Driver

6519 Kingston DataTraveler 2.0 USB Stick

653c Kingston DataTraveler 2.0 Stick (512M)

653d Kingston DataTraveler 2.0 Stick (1GB)

6544 TransMemory-Mini / Kingston DataTraveler 2.0 Stick (2GB)

6545 Kingston DataTraveler 102/2.0 / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick

0951 Kingston Technology

0d8a King Jim Co., Ltd

00a3 Smart King PRO Uninterruptible Power Supply (HID PDC

0e56 Kingston Technology Company, Inc.

0f8e Kingnet Technology Co., Ltd

13fe Kingston Technology Company Inc.

1f00 Kingston DataTraveler / Patriot Xporter

1687 Kingmax Digital Inc.

16df King Billion Electronics Co., Ltd.

2149 EntropyKing Random Number Generator

lsusb -v查看系統(tǒng)中USB設備的詳細信息

lsusb -v

7. lshw查看所有硬件摘要信息

下面命令可以查看所有硬件摘要信息,并輸出成一個html文件,把此html文件導出到電腦上,直接打開,可以清楚的看到硬件信息:

lshw -html 》 /hardware.html

8. lsscsi查看SCSI控制器設備的信息

可以看到SCSI信息和所有虛擬磁盤以及光驅(qū)的信息,如果沒有硬件SCSI控制器,那就不會返回信息:

root@ubuntu:/home/peng# lsscsi

[20:0] disk VMware, VMware Virtual S 1.0 /dev/sda

[40:0] cd/dvd NECVMWar VMware SATA CD01 1.00 /dev/sr0

插入一個U盤后再查看:

root@ubuntu:/home/peng# lsscsi

[20:0] disk VMware, VMware Virtual S 1.0 /dev/sda

[40:0] cd/dvd NECVMWar VMware SATA CD01 1.00 /dev/sr0

[330:0] disk Kingston DataTraveler G2 1.00 /dev/sdb

可以看到U盤為Kingston。

9. 查看bios信息

root@ubuntu:/home/peng# dmidecode -t bios

# dmidecode 3.0

Getting SMBIOS data from sysfs.

SMBIOS 2.7 present.

Handle 0x0000, DMI type 0, 24 bytes

BIOS Information

Vendor: Phoenix Technologies LTD

Version: 6.00

Release Date: 07/29/2019

Address: 0xEA480

Runtime Size: 88960 bytes

ROM Size: 64 kB

Characteristics:

ISA is supported

PCI is supported

PC Card (PCMCIA) is supported

PNP is supported

APM is supported

BIOS is upgradeable

BIOS shadowing is allowed

ESCD support is available

Boot from CD is supported

Selectable boot is supported

EDD is supported

Print screen service is supported (int 5h)

8042 keyboard services are supported (int 9h)

Serial services are supported (int 14h)

Printer services are supported (int 17h)

CGA/mono video services are supported (int 10h)

ACPI is supported

Smart battery is supported

BIOS boot specification is supported

Function key-initiated network boot is supported

Targeted content distribution is supported

BIOS Revision: 4.6

Firmware Revision: 0.0

dmidecode以一種可讀的方式dump出機器的DMI(Desktop Management Interface)信息。這些信息包括了硬件以及BIOS,既可以得到當前的配置,也可以得到系統(tǒng)支持的最大配置,比如說支持的最大內(nèi)存數(shù)等。

如果要查看所有有用信息

dmidecode -q

里面包含了很多硬件信息。

原文標題:9個Linux 常用查看系統(tǒng)硬件信息命令(實例詳解)

文章出處:【微信公眾號:Linux愛好者】歡迎添加關注!文章轉(zhuǎn)載請注明出處。

責任編輯:haq

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學習之用,如有內(nèi)容侵權或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • Linux
    +關注

    關注

    87

    文章

    11479

    瀏覽量

    213021
  • 硬件
    +關注

    關注

    11

    文章

    3466

    瀏覽量

    67282

原文標題:9個Linux 常用查看系統(tǒng)硬件信息命令(實例詳解)

文章出處:【微信號:LinuxHub,微信公眾號:Linux愛好者】歡迎添加關注!文章轉(zhuǎn)載請注明出處。

收藏 人收藏

    評論

    相關推薦
    熱點推薦

    Linux系統(tǒng)查看及修改設備型號信息,觸覺智能RK3562開發(fā)板演示

    本文介紹Linux系統(tǒng)如何查看及修改設備型號信息的方法,適用于想查看設備型號信息或者想將設備型號
    的頭像 發(fā)表于 06-19 15:58 ?87次閱讀
    <b class='flag-5'>Linux</b><b class='flag-5'>系統(tǒng)</b><b class='flag-5'>查看</b>及修改設備型號<b class='flag-5'>信息</b>,觸覺智能RK3562開發(fā)板演示

    SSH常用命令詳解

    SSH常用命令詳解
    的頭像 發(fā)表于 06-04 11:30 ?220次閱讀

    Linux用命令大全

    Linux用命令是指在Linux操作系統(tǒng)中廣泛使用的命令工具,這些命令工具可以完成各種不同的任
    的頭像 發(fā)表于 05-03 18:08 ?998次閱讀

    Linux系統(tǒng)中最重要的三命令

    Linux三劍客是Linux系統(tǒng)中最重要的三命令,它們以其強大的功能和廣泛的應用場景而聞名。這三
    的頭像 發(fā)表于 03-03 10:37 ?380次閱讀

    Linux實時查看日志的四種命令詳解

    如何在Linux實時查看日志文件的內(nèi)容?那么有很多實用程序可以幫助用戶在文件更改或不斷更新時輸出文件的內(nèi)容。在Linux實時顯示文件內(nèi)容
    的頭像 發(fā)表于 01-13 10:45 ?2804次閱讀
    <b class='flag-5'>Linux</b>實時<b class='flag-5'>查看</b>日志的四種<b class='flag-5'>命令</b>詳解

    嵌入式開發(fā)必備-RK3562演示Linux常用系統(tǒng)查詢命令

    本文介紹Linux系統(tǒng)查看硬件配置及常用調(diào)試命令,方便開發(fā)者快速了解開發(fā)板硬件
    的頭像 發(fā)表于 01-06 14:13 ?448次閱讀
    嵌入式開發(fā)必備-RK3562演示<b class='flag-5'>Linux</b>常用<b class='flag-5'>系統(tǒng)</b>查詢<b class='flag-5'>命令</b>

    嵌入式開發(fā)必備-RK3562演示Linux常用系統(tǒng)查詢命令(下)

    本文繼續(xù)介紹Linux系統(tǒng)查看硬件配置及常用調(diào)試命令,方便開發(fā)者快速了解開發(fā)板硬件
    的頭像 發(fā)表于 01-03 13:54 ?642次閱讀
    嵌入式開發(fā)必備-RK3562演示<b class='flag-5'>Linux</b>常用<b class='flag-5'>系統(tǒng)</b>查詢<b class='flag-5'>命令</b>(下)

    盤點Linux系統(tǒng)的常見命令

    作為運維同學怎能不知道Linux系統(tǒng)的lsmod、lsof、lspci、lsscsi命令呢,今天就來盤一盤她及實例。
    的頭像 發(fā)表于 12-03 09:48 ?731次閱讀
    盤點<b class='flag-5'>Linux</b><b class='flag-5'>系統(tǒng)</b><b class='flag-5'>中</b>的常見<b class='flag-5'>命令</b>

    全志T113-S3板載Linux系統(tǒng)信息查詢

    前言:作為普通Linux用戶或軟件開發(fā)人員,查看Linux系統(tǒng)系統(tǒng)
    的頭像 發(fā)表于 11-22 01:07 ?990次閱讀
    全志T113-S3板載<b class='flag-5'>Linux</b><b class='flag-5'>系統(tǒng)</b><b class='flag-5'>信息</b>查詢

    Linux系統(tǒng)shell命令解析

    shell是Linux系統(tǒng)的用戶界面,提供了用戶與內(nèi)核交互的一種接口,它接收用戶輸入的命令并到送到內(nèi)核去執(zhí)行,因此也被稱為Linux命令
    的頭像 發(fā)表于 11-05 15:40 ?848次閱讀

    詳解kubectl常用命令

    詳解kubectl常用命令
    的頭像 發(fā)表于 11-05 15:39 ?1224次閱讀
    詳解kubectl常<b class='flag-5'>用命令</b>

    Linux用命令大全

    Linux用命令大全
    的頭像 發(fā)表于 10-23 13:50 ?589次閱讀
    <b class='flag-5'>Linux</b>實<b class='flag-5'>用命令</b>大全

    Linux lsof命令的基本用法

    linux 系統(tǒng),一切皆文件。通過文件不僅僅可以訪問常規(guī)數(shù)據(jù),還可以訪問網(wǎng)絡連接和硬件。所以 lsof 命令不僅可以
    的頭像 發(fā)表于 10-23 11:52 ?1171次閱讀
    <b class='flag-5'>Linux</b> lsof<b class='flag-5'>命令</b>的基本用法

    Jtti:如何查看yum命令的錯誤日志來診斷問題?

    Linux系統(tǒng),當yum命令無法正常工作時,查看錯誤日志是診斷問題的重要步驟。以下是一些方法,可以幫助你
    的頭像 發(fā)表于 10-14 15:51 ?662次閱讀

    Windows操作系統(tǒng)的常用命令

    這些命令不僅能提高工作效率,還能幫助用戶解決許多復雜的問題。本系列文章將詳細介紹Windows操作系統(tǒng)的常用命令,幫助你成為Windows極客!
    的頭像 發(fā)表于 08-07 15:40 ?1094次閱讀
    Windows操作<b class='flag-5'>系統(tǒng)</b><b class='flag-5'>中</b>的常<b class='flag-5'>用命令</b>
    主站蜘蛛池模板: 黄色在线视频免费看 | 国产精品乱码高清在线观看 | 色多多免费观看 | 毛片大全高清免费 | 午夜福利123| 禁漫羞羞入口 | 午夜小影院 | 淫www| www懂爱 | 欧美日韩在线成人看片a | 国产热 | 久久99精品福利久久久 | 日本加勒比在线播放 | 性欧美大战久久久久久久野外 | 色多多最新地址福利地址 | 深夜视频在线播放视频在线观看免费观看 | 亚洲综合久久综合激情久久 | 成人99 | 四虎影视在线播放 | 天天摸日日摸人人看 | 午夜伦y4480影院中文字幕 | 免费看黄色录像 | 天堂在线中文无弹窗全文阅读 | 日日噜噜爽爽狠狠视频 | 日本暴力喉深到呕吐hd | 免费人成年激情视频在线观看 | 最近2018年中文字幕免费图片 | 日本69xxx| 全黄h全肉边做边吃奶在线观看 | 日本69式xxx视频 | 一级在线观看视频 | 久久亚洲精品成人综合 | 天天综合亚洲国产色 | 天天舔天天操 | 伊人精品视频在线 | 日本三级日本三级人妇三级四 | 免费观看视频高清www | 亚洲天天更新 | 能在线观看的一区二区三区 | 欧美乱淫 | 成年女人毛片免费视频 |