Ubuntu下查看CPU温度风扇转速和硬盘温度

本文详细介绍了在Ubuntu系统中通过安装lm-sensors和sensors-applet来查看CPU温度的方法,并提供了手动配置传感器的步骤。同时,还推荐了其他监控软件如xsensors、gdesklets和Gkrellm的安装方式,帮助用户更好地监控系统性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 转自:http://www.oschina.net/question/54100_11151


夏天到了,这几天本本的温度也飙升起来,在WinXP下玩了会CS,结果CPU一下就到了80度,吓得我赶紧关了。

ubuntu 10

下午Win7 64位旗舰版也下载完了,准备体验一下,就装个系统,网页都不浏览的情况下CPU居然60多度。然后就想到Ubuntu了,在

Ubuntu下面怎么样查看CPU的温度呢,百度了一下,还真找到了。

第一步:安装lm-sensors,打开终端键入

sudo apt-get install lm-sensors sensors-applet

根据提示键入Root密码,然后等待下载并安装完后关闭终端。在你想要显示传感器温度的面板位置右键,选择“添加到面板”菜单命

令,在列表中选择 “Hardware Sensors Monitor”后单击“添加”按钮即可添加该Applet程序。能直接检测到传感器那最好了。如果没有

检测到传感器(我的正常显示),显示”No sensors found”则转到下一步。

第二步:手动配置传感器

只要回答YES和按回车就可以了,和Windows里的‘下一步‘很像

sudo sensors-detect

会显示一堆东西,看不懂,贴出来

louis@Ubuntu-desktop:~$ sudo sensors-detect
# sensors-detect revision 4171 (2006-09-24 03:37:01 -0700)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you’re doing.

We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no): yes
Probing for PCI bus adapters…
Use driver `i2c-viapro’ for device 0000:00:11.0: VIA Technologies VT8233A/8235 South Bridge

We will now try to load each adapter module in turn.
Module `i2c-viapro’ already loaded.
If you have undetectable or unsupported adapters, you can have them
scanned by manually loading the modules before running this script.

To continue, we need module `i2c-dev’ to be loaded.
Do you want to load `i2c-dev’ now? (YES/no): yes
Module loaded successfully.

We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.

Next adapter: SMBus Via Pro adapter at 0400
Do you want to scan it? (YES/no/selectively): yes
Client found at address 0×4c
Handled by driver `lm90′ (already loaded), chip type `lm90′
Client found at address 0×4e
Probing for `National Semiconductor LM75′…                No
Probing for `Dallas Semiconductor DS1621′…                No
Probing for `Analog Devices ADM1021′…                     No
Probing for `Analog Devices ADM1021A/ADM1023′…            No
Probing for `Maxim MAX1617′…                              No
Probing for `Maxim MAX1617A’…                             No
Probing for `TI THMC10′…                                  No
Probing for `National Semiconductor LM84′…                No
Probing for `Genesys Logic GL523SM’…                      No
Probing for `Onsemi MC1066′…                              No
Probing for `Maxim MAX1619′…                              No
Probing for `National Semiconductor LM82/LM83′…           No
Probing for `Maxim MAX6659′…                              No
Probing for `Maxim MAX6633/MAX6634/MAX6635′…              No
Probing for `ITE IT8201R/IT8203R/IT8206R/IT8266R’…        No
Probing for `Fintek F75111R/RG/N (GPIO)’…                 No
Probing for `Fintek F75121R/F75122R/RG (VID+GPIO)’…       No
Client found at address 0×50
Probing for `Analog Devices ADM1033′…                     No
Probing for `Analog Devices ADM1034′…                     No
Probing for `SPD EEPROM’…                                 Success!
(confidence 8, driver `eeprom’)
Probing for `EDID EEPROM’…                                No
Probing for `Maxim MAX6900′…                              No
Client found at address 0×51
Probing for `Analog Devices ADM1033′…                     No
Probing for `Analog Devices ADM1034′…                     No
Probing for `SPD EEPROM’…                                 Success!
(confidence 8, driver `eeprom’)
Client found at address 0×69

Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no): yes
Probing for `National Semiconductor LM78′ at 0×290…       No
Probing for `National Semiconductor LM78-J’ at 0×290…     No
Probing for `National Semiconductor LM79′ at 0×290…       No
Probing for `Winbond W83781D’ at 0×290…                   No
Probing for `Winbond W83782D’ at 0×290…                   No
Probing for `Winbond W83627HF’ at 0×290…                  No
Probing for `Silicon Integrated Systems SIS5595′…         No
Probing for `VIA VT82C686 Integrated Sensors’…            No
Probing for `VIA VT8231 Integrated Sensors’…              No
Probing for `AMD K8 thermal sensors’…                     No
Probing for `IPMI BMC KCS’ at 0xca0…                      No
Probing for `IPMI BMC SMIC’ at 0xca8…                     No

Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): yes
Probing for Super-I/O at 0×2e/0×2f
Trying family `ITE’…                                      Yes
Found `ITE IT8705F Super IO Sensors’                        Success!
(address 0×290, driver `it87′)
Trying family `National Semiconductor’…                   No
Trying family `SMSC’…                                     No
Trying family `VIA/Winbond/Fintek’…                       No
Probing for Super-I/O at 0×4e/0×4f
Trying family `ITE’…                                      Yes
Found `ITE IT8705F Super IO Sensors’                        Success!
(address 0×290, driver `it87′)
Trying family `National Semiconductor’…                   No
Trying family `SMSC’…                                     No
Trying family `VIA/Winbond/Fintek’…                       No

Now follows a summary of the probes I have just done.
Just press ENTER to continue: ENTER

Driver `lm90′ (should be inserted):
Detects correctly:
* Bus `SMBus Via Pro adapter at 0400′
Busdriver `i2c-viapro’, I2C address 0×4c
Chip `lm90′ (confidence: 6)

Driver `eeprom’ (should be inserted):
Detects correctly:
* Bus `SMBus Via Pro adapter at 0400′
Busdriver `i2c-viapro’, I2C address 0×50
Chip `SPD EEPROM’ (confidence: 8)
* Bus `SMBus Via Pro adapter at 0400′
Busdriver `i2c-viapro’, I2C address 0×51
Chip `SPD EEPROM’ (confidence: 8)

EEPROMs are *NOT* sensors! They are data storage chips commonly
found on memory modules (SPD), in monitors (EDID), or in some
laptops, for example.

Driver `it87′ (should be inserted):
Detects correctly:
* ISA bus address 0×0290 (Busdriver `i2c-isa’)
Chip `ITE IT8705F Super IO Sensors’ (confidence: 9)

I will now generate the commands needed to load the required modules.
Just press ENTER to continue: ENTER

To make the sensors modules behave correctly, add these lines to
/etc/modules:

#—-cut here—-
# I2C adapter drivers
i2c-viapro
# Chip drivers
lm90
eeprom
it87
#—-cut here—-

第三步:安装其他监控软件xsensors,ksensors,gdesklets(gdesklets里有很多桌面小程序),Gkrellm,hddtemp等,自己选择安装。

sudo apt-get install xsensors或者ksensors(KDE中推荐使用ksensors)

sudo apt-get install gdesklets gkrellm

sudo apt-get install hddtemp

在终端里查看:

iletit@ubuntu:~$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:       +52.0°C  (crit = +110.0°C)

iletit@ubuntu:~$

网上的教材显示了很多东西,我的只显示了这么点,可能是硬件不同,或者是我少操作的些什么东西不过能看到温度就可以了。
下面还有一种是图形界面的,非常直观

CPU的温度小工具

工具叫GNOME Sensors 自己在软件中心搜索下吧

GNOME sensors

OK,祝大家在Linux下玩的愉快


<think>嗯,用户想了解在Ubuntu系统中查看电脑硬件配置的方法。用户已经提供了三个引用内容,涵盖了硬件配置的基本查看方式。现在需要结合这些引用来整理出清晰明了的操作指南。用户应该是个刚开始使用Ubuntu的新手,因为这些查询命令都比较基础。需要将命令整理得简单易懂,最好把查看不同硬件类型的命令分类说明。先从最常用的命令开始考虑,比如sudolshw这种综合性的硬件报告工具,可以用-tree参数格式化输出。在引用3中提到lspci查看PCI设备信息,这个对查看扩展卡很有用。另外lsusb适合排查外接设备问题。引用1中提到的sudoaptinstallhardinfo是个不错的图形化方案,适合命令行恐惧症用户。关于具体组件:查看内存用free-h或查看/proc/meminfo,CPU信息用lscpu或者cat/proc/cpuinfo。引用2补充了CPU温度检测的sudoaptinstalllm-sensors方案,还有sensors命令带监测温度。对于带N卡的用户,引用1提到的nvidia-smi命令很实用。对于特别组件:硬盘用lsblkdf-h组合,分区表还能用sudofdisk-l。网卡信息可以参考引用3里的dmesg|grep-ieth过滤方式。还应该提一下查询操作系统信息的uname-alsb_release-a。如果用户需要更专业的工具,可以补充hwinfodmidecode这种底层工具。考虑到用户可能会遇到的权限问题,得记得提示sudo的用法。最后用个思维导图式的分类说明,方便用户快速查找。</think> 好的,在Ubuntu系统中,可以通过多种命令行工具图形界面工具来查看详细的电脑硬件配置信息。以下是常用且实用的方法,综合了您的引用内容: 📖 **一、使用命令行工具(最常用强大的方式)** 1. **`sudo lshw`: 查看综合详细的硬件信息(推荐)** * 这是一个最强大、最全面的命令行工具,可显示详细的硬件架构信息(CPU、内存、主板、磁盘、网络控制器、显卡、总线等)。 * 基本命令: ```bash sudo lshw -short # 以简洁格式显示设备树概览 sudo lshw -html > hardware.html # 生成详细HTML报告(需要安装`lshw-gtk`) ``` * 使用 `grep` 过滤特定信息(例如只看CPU): ```bash sudo lshw -C cpu sudo lshw -C memory sudo lshw -C disk sudo lshw -C display sudo lshw -C network ``` 2. **`lspci`: 查看所有PCI设备信息(主板、显卡、网卡、声卡等)** * 显示连接到PCI、PCIe总线上的所有设备。 * 基本命令: ```bash lspci lspci -v # 更详细信息(显示驱动等) lspci -vv # 非常详细的信息 ``` * 使用 `grep` 过滤: ```bash lspci | grep -i vga # 查看显卡 lspci | grep -i audio # 查看声卡 lspci | grep -i eth # 查看以太网卡(见引用3) lspci | grep -i network # 查看网络设备(无线网卡等) ``` 3. **`lsusb`: 查看所有USB设备信息(鼠标、键盘、U盘等外设)** * 显示连接到USB总线上的所有设备。 * 基本命令: ```bash lsusb lsusb -v # 更详细信息 ``` 4. **`uname`: 查看系统内核架构信息** * 基本命令: ```bash uname -a # 显示所有信息(内核名称、主机名、内核发行版本、内核版本、硬件架构、操作系统等) uname -m # 显示硬件架构(e.g., x86_64, i686, aarch64) ``` 5. **`lsb_release`: 查看Ubuntu发行版具体信息**(见引用1) * 基本命令: ```bash lsb_release -a # 显示完整描述信息 lsb_release -d # 显示描述信息(通常包含版本号) cat /etc/lsb-release # 直接查看配置文件(效果类似) cat /etc/os-release # 另一种查看系统版本信息的方式 ``` 6. **`lscpu`: 查看CPU架构信息(概要)**(见引用1) * 清晰显示处理器架构、核心数、线程数、型号、频率、缓存等。 * 基本命令: ```bash lscpu ``` 7. **`free`: 查看内存使用情况** * 基本命令: ```bash free -h # -h 选项以人类可读格式显示(GB, MB) cat /proc/meminfo # 获取更详细的内存信息 ``` 8. **`df` `lsblk`: 查看磁盘分区与使用情况** * `df`: ```bash df -h # 显示已挂载分区的磁盘使用情况(-h 人类可读) ``` * `lsblk`: ```bash lsblk # 列出所有块设备(磁盘分区)的树状结构 lsblk -f # 同时显示文件系统类型挂载点 sudo fdisk -l # 查看详细的磁盘分区表信息(需要sudo) sudo parted -l # 另一个查看分区信息的工具(支持GPT分区表) ``` 9. **`sensors`: 查看硬件(CPU/主板)温度风扇转速等**(需要安装`lm-sensors`,见引用2) * 安装: ```bash sudo apt update && sudo apt install lm-sensors ``` * 运行传感器检测(通常选默认值): ```bash sudo sensors-detect ``` * 查看温度/转速信息: ```bash sensors sensors coretemp-isa-0000 # 查看特定CPU核心的温度包 ``` 10. **`nvidia-smi`: 查看NVIDIA显卡信息(如适用)**(见引用1) * 基本命令: ```bash nvidia-smi # 查看实时GPU状态(型号、使用率、温度、显存使用等) nvidia-smi -L # 列出所有NVIDIA GPU设备 nvidia-smi -l 5 # 每5秒刷新一次状态(-l 指定秒数) nvidia-smi -q # 查询非常详细的显卡信息(包括温度上限、支持的编码器/解码器等) ``` 🖥️ **二、使用图形界面工具** 1. **System Settings > Details / About**: * 最简单的方法。进入系统设置,找到 "Details" 或 "About" 选项。这里会显示基本的系统概览,包括计算机名、Ubuntu版本、内存、处理器(型号频率)、显卡型号等基础信息。 2. **Hardinfo (System Information)**: * 一个强大的图形化工具,提供类似`lshw`的详细信息,但更易阅读(见引用1)。它会将硬件信息分类整理,如计算机、中央处理器、操作系统、内存、主板、显示器、图形处理器等。 * 安装: ```bash sudo apt update && sudo apt install hardinfo ``` * 运行: ```bash hardinfo # 从终端启动 ``` 或者在应用菜单中搜索 "System Information" 或 "Hardinfo"。 📌 **总结建议:** * **快速概览:** `lscpu`, `free -h`, `lsb_release -a`, `nvidia-smi` (如有N卡), System Settings。 * **全面深入命令行:** `sudo lshw -short`, `sudo lshw -html > hardware.html`。 * **特定设备:** * PCI设备(主板、显卡、网卡):`lspci` * USB设备:`lsusb` * CPU温度:`sensors` (需安装`lm-sensors`) * 磁盘分区:`lsblk`, `df -h`, `sudo fdisk -l` * **图形化界面:** `hardinfo`。 选择哪种方法取决于你需要信息的详细程度偏好(命令行 vs 图形界面)。上述命令基本覆盖了Ubuntu系统下查看硬件配置的所有主要途径[^1][^2][^3]。 📚 **相关问题:** 1. 如何在 Ubuntu查看实时的 CPU/内存使用率? 2. Ubuntu 下怎样监测硬盘的健康状况(SMART信息)? 3. 如何区分 UbuntuCPU 逻辑核心物理核心数量? 4. 在 Ubuntu Server 无图形界面下,有哪些替代 Hardinfo 的命令行工具? 5. Ubuntu 系统中如何查看内核已加载的驱动模块信息?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值