How to check CPU temperature on Raspberry Pi

It is always a good idea to keep an eye on the temperature of your Raspberry Pi’s CPU. Although this small processor packs a punch for its size, it is important to remember that it does not have a fan or any other cooling ability by default. That means that if the processor is constantly working hard, CPU temperatures could get high and eventually damage the device.

For those looking to overclock their Raspberry Pi, it is especially important to monitor CPU temperatures. In this tutorial, you will see how to check the CPU temperature on a Raspberry Pi from both command line and GUI on Raspberry Pi OS.

In this tutorial you will learn:

  • How to check Raspberry Pi CPU temperature via command line
  • How to check Raspberry Pi CPU temperature via desktop GUI
How to check CPU temperature on Raspberry Pi
How to check CPU temperature on Raspberry Pi
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Raspberry Pi
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to check CPU temperature on Raspberry Pi




We will cover two methods below, both command line and GUI. The command line method allows you to check the temperature even if you are not physically in front of the Raspberry Pi, such was with an SSH connection. On the other hand, the GUI desktop method allows you to continuously monitor the CPU temperature by adding a desktop component to the corner of the screen. This is good for users that are sitting at their Raspberry Pi or using a VNC connection. Feel free to choose whichever method makes the most sense for your situation.

Check CPU Temperature via Command Line

The easiest way to check the CPU temperature from command line on a Raspberry Pi is with the following command:

$ vcgencmd measure_temp
Getting the CPU temperature via command line on Raspberry Pi
Getting the CPU temperature via command line on Raspberry Pi
NOTE
It is also possible to use the lm_sensors Linux kernel module to check the CPU temperature on Raspberry Pi. Check out how to do it in our other tutorial: Get CPU temperature on Linux.

Check CPU Temperature via Desktop GUI

  1. Get started by right clicking on the task bar at the top of your screen (the default location for the bar in Raspberry Pi OS). Then, click on Add / Remove Panel Items.

    Right clicking on the Raspberry Pi desktop taskbar to reveal the menu
    Right clicking on the Raspberry Pi desktop taskbar to reveal the menu



  2. In the Panel Preferences window that opens up, click on the ‘Add’ button to the right side.
    Click the 'Add' button to get started adding a new panel item
    Click the ‘Add’ button to get started adding a new panel item
  3. From the Plugin Panel menu, find the plugin named ‘CPU Temperature Monitor.’ Highlight that option, and then click on ‘Add.’
    Selecting the CPU Temperature Monitor plugin from the menu list
    Selecting the CPU Temperature Monitor plugin from the menu list
  4. Now we can see the CPU temperature monitor plugin in our desktop’s taskbar.
    The CPU temperature monitor plugin is now active
    The CPU temperature monitor plugin is now active
  5. For further customization options, right click on the CPU temperature monitor and select the option for ‘CPU Temperature Monitor Settings…’
    Opening up the options menu for CPU Temperature Monitor plugin
    Opening up the options menu for CPU Temperature Monitor plugin
  6. Inside this menu, we can customize various settings such as the foreground color, background color, color when ARM frequency is capped, color when throttled, as well as the lower temperature bound and upper temperature bound.
    Customizing the settings of Raspberry Pi's CPU Temperature Monitor plugin
    Customizing the settings of Raspberry Pi’s CPU Temperature Monitor plugin


Closing Thoughts

In this tutorial, we saw how to check the CPU temperature on a Raspberry Pi system. This included a command line method and GUI desktop method, depending on whether you use your device as command line only or usually have a monitor connected or VNC connection. It is always a good idea to keep on eye on your Raspberry Pi’s CPU temperature as well as perform additional system health checks.



Comments and Discussions
Linux Forum