问答1 问答5 问答50 问答500 问答1000
网友互助专业问答平台

教你linux系统查看硬件信息的方法linux系统如何查看硬件信息

提问网友 发布时间:2025-01-12 06:16
声明:本网页内容为用户发布,旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:1656858193@qq.com
1个回答
热心网友 回答时间:2025-01-15 23:05
用过Linux系统的人都知道这么一个情况,那就是Linux大部分操作是通过命令实现的,并不像Windows那么直观。linux查看硬件信息也是需要通过命令查询才可以看得到硬件的信息,那linux系统如何查看硬件信息呢?今天,就和大家说一下linux系统查看硬件信息的方法。
步骤如下:
1、cpu
lscpu命令,查看的是cpu的统计信息。
blue@blue-pc:~$lscpu
Architecture:i686#cpu架构
cpuop-mode(s):32-bit,64-bit
ByteOrder:LittleEndian#小尾序
cpu(s):4#总共有4核
On-linecpu(s)list:0-3
Thread(s)percore:1#每个cpu核,只能支持一个线程,即不支持超线程
Core(s)persocket:4#每个cpu,有4个核
Socket(s):1#总共有1一个cpu
vendorID:GenuineIntel#cpu产商intel
cpufamily:6
Model:42
Stepping:7
cpuMHz:1600.000
BogoMIPS:5986.12
Virtualization:VT-x#支持cpu虚拟化技术
L1dcache:32K
L1icache:32K
L2cache:256K
L3cache:6144K
查看/proc/cpuinfo,可以知道每个cpu信息,如每个cpu的型号,主频等。
#cat/proc/cpuinfo
processor:0
vendor_id:GenuineIntel
cpufamily:6
model:42
modelname:Intel(R)Core(TM)i5-2320cpu@3.00GHz
。。。。。
上面输出的是第一个cpu部分信息,还有3个cpu信息省略了。
2、内存
概要查看内存情况
free-m
totalusedfreesharedbufferscached
Mem:39263651274012404
-/+buffers/cache:3235691
Swap:9536319505
这里的单位是MB,总共的内存是3926MB。
查看内存详细使用
#cat/proc/meminfo
MemTotal:4020868kB
MemFree:230884kB
Buffers:7600kB
Cached:454772kB
SwapCached:836kB
。。。。。
查看内存硬件信息
dmidecode-tmemory
#dmidecode2.11
SMBIOS2.7present.
Handle0x0008,DMItype16,23bytes
PhysicalMemoryArray
Location:SystemBoardOrmotherboard
。。。。
MaximumCapacity:32GB
。。。。
Handle0x000A,DMItype17,34bytes
。。。。
MemoryDevice
ArrayHandle:0x0008
ErrorinformationHandle:NotProvided
TotalWidth:64bits
DataWidth:64bits
Size:4096MB
。。。。。
我的主板有4个槽位,只用了一个槽位,上面插了一条4096MB的内存。
3、磁盘
查看硬盘和分区分布
#lsblk
NAMEMAJ:MINRMSIZEROTYPEMOUNTPOINT
sda8:00465.8G0disk
├—sda18:101G0part/boot
├—sda28:209.3G0part[SWAP]
├—sda38:3074.5G0part/
├—sda48:401K0part
├—sda58:50111.8G0part/home
└—sda68:60269.2G0part
显示很直观
如果要看硬盘和分区的详细信息
#fdisk-l
disk/dev/sda:500.1GB,500107862016bytes
255heads,63sectors/track,60801cylinders,total976773168sectors
Units=sectorsof1*512=512bytes
Sectorsize(logical/physical):512bytes/4096bytes
I/Osize(minimum/optimal):4096bytes/4096bytes
diskidentifier:0x00023728
DeviceBootStartEndBlocksIdSystem
/dev/sda1*20482148351107315283Linux
/dev/sda2214835221680127976588882Linuxswap/Solaris
/dev/sda3216801281779302397812505683Linux
/dev/sda41779322869767710713994193935Extended/dev/sda517793228841230540711718656083Linux
/dev/sda641230745697677107128223180883Linux
4、网卡
查看网卡硬件信息
#lspci|grep-i‘eth’
02:00.0Ethernetcontroller:RealtekSemiconductorCo.,Ltd.RTL8111/8168BPCIExpressGigabitEthernetcontroller(rev06)
查看系统的所有网络接口
#ifconfig-a
eth0Linkencap:以太网硬件地址b8:97:5a:17:b3:8f
。。。。。
loLinkencap:本地环回
。。。。。
或者是
iplinkshow
1:lo:《LOOPBACK》mtu16436qdiscnoqueuestateDOWN
link/loopback00:00:00:00:00:00brd00:00:00:00:00:00
2:eth0:《broADCAST,MULTICAST,UP,LOWER_UP》mtu1500qdiscpfifo_faststateUPqlen1000
link/etherb8:97:5a:17:b3:8fbrdff:ff:ff:ff:ff:ff
如果要查看某个网络接口的详细信息,例如eth0的详细参数和指标
#ethtooleth0
Settingsforeth0:
Supportedports:[TPMII]
Supportedlinkmodes:10baseT/Half10baseT/Full
100baseT/Half100baseT/Full
1000baseT/Half1000baseT/Full#支持千兆半双工,全双工模式
Supportedpauseframeuse:No
Supportsauto-negotiation:Yes#支持自适应模式,一般都支持
Advertisedlinkmodes:10baseT/Half10baseT/Full
100baseT/Half100baseT/Full
1000baseT/Half1000baseT/Full
Advertisedpauseframeuse:SymmetricReceive-only
Advertisedauto-negotiation:Yes#默认使用自适应模式
Linkpartneradvertisedlinkmodes:10baseT/Half10baseT/Full
100baseT/Half100baseT/Full
。。。。。
Speed:100Mb/s#现在网卡的速度是100Mb,网卡使用自适应模式,所以推测路由是100Mb,导致网卡从支持千兆,变成要支持百兆
Duplex:Full#全双工
。。。。。
Linkdetected:yes#表示有网线连接,和路由是通的
5、其他
查看pci信息,即主板所有硬件槽信息。
lspci
00:00.0Hostbridge:IntelCorporation2ndGenerationCoreProcessorFamilyDRAMController(rev09)#主板芯片
00:02.0VGAcompatiblecontroller:IntelCorporation2ndGenerationCoreProcessorFamilyIntegratedGraphicsController(rev09)#显卡
00:14.0USBcontroller:IntelCorporationPantherPointUSBxHCIHostController(rev04)#usb控制器
00:16.0Communicationcontroller:IntelCorporationPantherPointMEIController#1(rev04)
00:1a.0USBcontroller:IntelCorporationPantherPointUSBEnhancedHostController#2(rev04)
00:1b.0Audiodevice:IntelCorporationPantherPointHighDeFinitionAudioController(rev04)#声卡
00:1c.0PCIbridge:IntelCorporationPantherPointPCIExpressRootPort1(revc4)#pci插槽
00:1c.2PCIbridge:IntelCorporationPantherPointPCIExpressRootPort3(revc4)
00:1c.3PCIbridge:IntelCorporationPantherPointPCIExpressRootPort4(revc4)
00:1d.0USBcontroller:IntelCorporationPantherPointUSBEnhancedHostController#1(rev04)
00:1f.0ISAbridge:IntelCorporationPantherPointLPCController(rev04)
00:1f.2IDEinterface:IntelCorporationPantherPoint4portSATAController[IDEmode](rev04)#硬盘接口
00:1f.3SMBus:IntelCorporationPantherPointSMBusController(rev04)
00:1f.5IDEinterface:IntelCorporationPantherPoint2portSATAController[IDEmode](rev04)#硬盘接口
02:00.0Ethernetcontroller:RealtekSemiconductorCo.,Ltd.RTL8111/8168BPCIExpressGigabitEthernetcontroller(rev06)#网卡
03:00.0PCIbridge:IntegratedTechnologyExpress,Inc.Device8893(rev41)
如果要更详细的信息:lspci-v或者lspci-vv
如果要看设备树:lscpi-t
查看bios信息
#dmidecode-tbios
。。。。。。
BIOSinformation
vendor:AmericanMegatrendsInc.
Version:4.6.5
ReleaseDate:04/25/2012
。。。。。。。
BIOSRevision:4.6
。。。。。。
dmidecode以一种可读的方式dump出机器的DMI(DesktopManagementInterface)信息。这些信息包括了硬件以及BIOS,既可以得到当前的配置,也可以得到系统支持的最大配置,比如说支持的最大内存数等。
如果要查看所有有用信息
dmidecode-q
以上是linux查看硬件信息的所有命令,可以查看cpu、硬盘、网卡、磁盘等硬件的信息。
关于linux系统查看硬件信息的方法就给各位详细介绍到这里了。有使用linux系统的用户,如你还不知道怎么查看硬件信息的,现在只要按照上述的步骤去操作就可以查看到你电脑硬件的信息了。

本文如未解决您的问题请添加抖音号:51dongshi(抖音搜索懂视),直接咨询即可。

如何查看Linux的CPU 核心数,型号,个数? 【干货】linux查看cpu信息,【收藏】linux查看cpu信息 Linux下如何查看CPU信息通过终端命令获取详细的CPU信息 转账和汇款什么区别 《水调歌头》苏轼 明月几时有拼音版 如何查看微信自己撤回的消息 融资债务类型包括哪些 债务融资债务融资的类型结构 债务融资类型结构有哪些呢? 关于债务融资的类型结构具体都有什么 债务融资的类型结构具体都有哪些? 债务融资有哪些类型结构呢? 空调加氟的压力应该多少? 空调正常加氟要加多少压力? 空调加氟加多少压力啊? 潘晓娴《会飞的蒲公英》写作目的 女性来月经时是不会出现性冷淡但最好不要过性生活 怎么办我来了月经特别想过性生活? 来大姨妈的女人是不是性欲会很高 天堂凤蝶是闪蝶吗 带偏旁"走字"的字大都与什么有什么有关 特美斯香烟是哪里产的 石加乐念什么 衣服上溅到水泥砂浆!用什么可以洗掉 衣服上粘上和水泥的胶水怎么祛除? 水泥酸性用什么洗 衣服上有 水泥怎么洗 八爪鱼和鱿鱼有区别么 养一只蠢萌的秋田犬是什么感受? 养秋田犬的感受是怎样的 养一只秋田犬会上瘾,这4大优点让人着迷! 养只秋田犬怎么样? 养秋田犬的人都后悔了是什么原因 缺点有哪些 秋田犬怎么样适合养吗? 日本秋田犬怎么样好养吗 北京至天津的普通列车每天几趟 鼠标不能动,鼠标可以点击但不能移动怎么处理? 踏板操是什么? 踏板操是什么 心脏病判定指标
Top