How To View CPU Temperature On Alpine Linux

Alpine Linux comes with a monitoring sensors package called lm-sensors. It is an easy-to-use and open-source application for monitoring CPU temperatures, voltage, and fans. This page explains how to install, configure, and use lm-sensors on Alpine Linux to view CPU temperature and other data on your Alpine Linux-powered laptop or server.

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Alpine Linux
Est. reading time 2 minutes

Viewing CPU Temperature On Alpine Linux

Let us search and find the correct package name and drivers for CPU sensors. We use the apk command as follows:
# apk search sensors
We will get a long list of packages:


Confirm that we are going to install the correct package in Alpine Linux:
# apk info lm-sensors

lm-sensors-3.6.0-r1 description:
Collection of user space tools for general SMBus access and hardware monitoring.
lm-sensors-3.6.0-r1 webpage:
lm-sensors-3.6.0-r1 installed size:
204 KiB


Install the lm-sensors package using apk command # apk add lm-sensors lm-sensors-detect

How To Install and View CPU Temperature On Alpine Linux

Installing lm-sensors on Alpine Linux


We need to run the following sensors-detect to identify and generate a list of kernel modules for your hardware. I am using ThinkPad X140e with AMD A4-5000 APU with Radeon(TM) HD Graphics
# sensors-detect
Once you typed the command, you will see many questions regarding your hardware. Don’t be alarmed. It is safe to accept the default by pressing the [Enter] key to all questions. In other words, just hit the [Enter] key. When the detection is done, a review of the probes is shown on the screen.

Running sensors to view CPU temperature and fan speed on Alpine

All you have to do is type the following command:
# sensors
Outputs from my Thinkpad laptop:

Adapter: PCI adapter
temp1:        +57.0°C  (high = +70.0°C)
                       (crit = +100.0°C, hyst = +99.0°C)
Adapter: ISA adapter
fan1:         599 RPM
temp1:        +56.0°C  
temp2:         +0.0°C  
temp3:        +56.0°C  
temp4:         +0.0°C  
temp5:         +0.0°C  
temp6:         +0.0°C  
temp7:        +33.0°C  
temp8:         +0.0°C  
temp9:        +41.0°C  
temp10:        +0.0°C  
temp11:        +0.0°C  
temp12:        +0.0°C  
temp13:        +0.0°C  
temp14:        +0.0°C  
temp15:        +0.0°C  
temp16:        +0.0°C  
Adapter: PCI adapter
power1:           N/A  (crit =  15.00 W)
Adapter: PCI adapter
temp1:        +57.0°C  (crit = +120.0°C, hyst = +90.0°C)

Using graphical front-ends to read data

There are many front-ends for sensor data. Try the following as per your desktop:

  1. GNOME Shell extension and applet.
  2. Show readings from hardware sensors in your MATE panel when using MATE desktop
  3. Sensors (Xfce4 panel plugin) from goodies package
  4. KDE Plasma applet for monitoring CPU, GPU and other available temperature sensors.

Summing up

You learned how to install, set up, and configure the lm-sensors package on Alpine Linux to view CPU fan speed, temperature, and other data. We can use the watch command to execute a program periodically, showing output fullscreen. For instance, we can watch sensors as follows:
# watch sensors
# watch -n 1 sensors

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum