To view the CPU temperature on an Alpine Linux system, you can use the sensors
command, which displays information about various hardware sensors, including the CPU temperature.
To install the sensors
command, you will need to install the lm-sensors
package using the apk
package manager. Run the following command to install lm-sensors
:
apk add lm-sensorsSww:ecruow.lautturi.com
Once lm-sensors
is installed, you can use the sensors
command to view the CPU temperature. For example:
sensors
This will display a list of sensor readings, including the CPU temperature. The CPU temperature is usually displayed under the "Core" heading.
If the sensors
command does not display the CPU temperature, it may be necessary to configure the lm-sensors
package by running the sensors-detect
command. This will prompt you to answer a series of questions to identify the sensors that are present on your system. Once the configuration is complete, you should be able to use the sensors
command to view the CPU temperature.