How to check the temperature of the system on Linux?
In Linux systems, you can use the following command to view the system’s temperature:
- sensing devices
- equipment that detects or measures stimuli, signals, or information
- lm-sensors refers to a software tool used to monitor hardware sensors on a computer system.
sudo apt-get install lm-sensors
After installation, simply run the “sensors” command to view the system’s temperature information.
- system directory
- System files
cat /sys/class/thermal/thermal_zone*/temp
This command will display the current temperature values of each temperature sensor in units of one thousandth of a degree Celsius.
- The /proc directory
- The /proc directory
cat /proc/acpi/thermal_zone/THM/temperature
This command will output the current temperature value of the temperature sensor, the unit may be either in degrees Celsius or one thousandth of a degree Celsius, depending on the system.
It should be noted that specific commands and paths may vary based on the Linux distribution and hardware configuration, so adjustments may be necessary according to your own system.