How to Check the Temperature of Your CPU in Ubuntu

The Thermal Throttling Vector

When operating an Ubuntu Linux machine under intense workloads—such as compiling large software repositories, rendering video, or training machine learning models—the Central Processing Unit (CPU) generates massive amounts of heat. If the cooling system fails or the ambient environment is too hot, the CPU will automatically engage thermal throttling, drastically reducing its clock speed to prevent physical melting. Administrators must be able to monitor these temperatures in real-time to intercept cooling failures before they degrade performance.

How to Check Your CPU Temperature

The standard, highly reliable method for querying hardware thermals in Ubuntu requires the installation of a tiny utility package known as lm-sensors.

1. Open your terminal application or connect to your server via SSH.
2. First, install the utility by executing the following command with elevated privileges:

sudo apt install lm-sensors

3. Once the installation completes, you must force the system to detect the various thermal diodes physically embedded in your motherboard. Execute the detection command:

sudo sensors-detect

4. The script will ask you a series of questions. It is generally safe to repeatedly press Enter to accept the default (YES) answers for all hardware probes.
5. To actually read the live temperatures, execute the base command:

sensors

The terminal will instantly output a list of all detected hardware components, including the precise, live Celsius reading for every individual core within your processor.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.