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
|Category||Requirements, Conventions or Software Version Used|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – 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
It is also possible to use the
lm_sensorsLinux 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
- 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.
- In the Panel Preferences window that opens up, click on the ‘Add’ button to the right side.
- From the Plugin Panel menu, find the plugin named ‘CPU Temperature Monitor.’ Highlight that option, and then click on ‘Add.’
- Now we can see the CPU temperature monitor plugin in our desktop’s taskbar.
- For further customization options, right click on the CPU temperature monitor and select the option for ‘CPU Temperature Monitor Settings…’
- 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.
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.