How To View CPU Temperature On Alpine Linux

On Alpine Linux, you can view the CPU temperature using the “sensors” command, which is a command-line utility for monitoring the temperature of various hardware components.

  1. To view the CPU temperature, you need to first install the “lm_sensors” package by running the following command:
apk add lm_sensors
  1. Once the package is installed, you can use the “sensors” command to view the CPU temperature.
sensors
  1. This command will display the temperature of all the sensors that are detected by the system. You can use the grep command to filter the output and display only the temperature of the CPU.
sensors | grep -i "Core"
  1. To check the temperature of a specific core you can use the following command:
sensors | grep -i "Core 0"

It is important to note that the exact output of the sensors command may vary depending on the type of CPU and sensors present in your system. Additionally, some systems may not have the sensors package installed by default, in that case, you may need to install it manually as described in step 1.

Leave a Comment