How do I check CPU temperature in Ubuntu Linux using a command line and GUI tools on my Thinkpad laptop or Desktop computer?
One of the most common complaints is the overheating laptop, especially older models. Laptop components are tightly put together to each other. So there is very little room for air movement in thinner laptops. If your laptop overheats, it can cause some damage to your body as well as the hardware parts. Therefore monitoring hardware temperature is essential. In this tutorial, you will learn how to check CPU temperature in Ubuntu Linux.
Adblock detected 😱
Procedure for monitoring CPU and HDD temperatures on Ubuntu
- Open the terminal application.
- Install the lm-sensors and hddtemp packages in Ubuntu using the sudo apt install hddtemp lm-sensors.
- Run hddtemp command to see SSD and hard drive temperature in Ubuntu.
- Execute sensors command to find out CPU temperature in Ubuntu Linux.
Check CPU temperature in Ubuntu Linux
The sensors command is used in Linux to show the current readings of all sensor chips including CPU temp. The hddtemp command will show you the temperature for SSD and HDD. You need to install and configure the lm-sensors package as well as hddtemp. You can search it using the following syntax:
apt-cache search lm-sensors
apt-cache search hddtemp
To install these packages on Ubuntu, run the following apt command or apt-get command in a terminal:
sudo apt update
sudo apt upgrade
Install lm-sensors in Ubuntu Linux
Type the following apt command:
sudo apt install lm-sensors
Next you need to detect hardware monitoring chips installed in your laptop. Hence, start the detection of your laptop hardware sensors that will provide information about:
- Sensors embedded in CPUs and other super I/O chips
- Hardware monitoring chips accessed through I/O ports and SMBus/I2C bus on your system
Type the following command:
Display CPU temperature in the command line
Execute the following command:
One can use the watch command command to run sensors command repeatedly, displaying its output on screen:
How can I show the CPU temperature in the GNOME panel
Install Freon and Sensors extension for Ubuntu Linux desktop:
How to install hddtemp in Ubuntu Linux
Run the following apt command:
sudo apt install hddtemp
How to see hard disk temperature in Ubuntu
sudo hddtemp SATA:/dev/sda
/dev/sda: Samsung SSD 850 EVO 500G: 32°C
Use disks & storage GUI tool to view hard disk temp
Hard disks have a built-in health-check tool called SMART (Self-Monitoring, Analysis, and Reporting Technology), which continually checks the disk for potential problems. SMART also warns you if the disk is about to fail, helping you avoid loss of important data. It also displays hard disk temperature. Run:
How to monitor Nvme ssd temperature in Ubuntu
First install nvme-cli, run:
sudo apt install nvme-cli
Now use the nvme command as follows to get list of all NVMe devices and namespaces on machine:
sudo nvme list
Node SN Model Namespace Usage Format FW Rev ---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- -------- /dev/nvme0n1 S3EUNX0JXXXXXXH Samsung SSD 960 EVO 500GB 1 36.53 GB / 500.11 GB 512 B + 0 B 2B7QCXE7
Node SN Model Namespace Usage Format FW Rev
—————- ——————– —————————————- ——— ————————– —————- ——–
/dev/nvme0n1 S3EUNX0JXXXXXXH Samsung SSD 960 EVO 500GB 1 36.53 GB / 500.11 GB 512 B + 0 B 2B7QCXE7
sudo nvme smart-log /dev/nvme0
One can filter output using the grep command:
sudo nvme smart-log /dev/nvme0 | grep temperature
temperature : 40 C
Releated: Linux Monitor Hard Disks Temperature With hddtemp
What to do when a laptop gets way too hot
- Open your laptop and remove (blow out) all the dust from fans and hardware.
- Buy a good laptop cooler to place your laptop on.
- Make sure your Thinkpad laptop positioned on a flat and hard surface.
- Shutdown unwanted Linux apps that use lots of CPU, ram, hard drive, and stress out your system.
- Above all use power saving mode on your laptop.
In conclusion, keep your laptop fan clean and dust free to reduce the temperature. In some extreme cases, you may need to replace a heat sink to keep a hot component such as a processor cool. Similarly, use the quality thermal paste to fill in the gaps and allow for better transfer of heat from the heat spreader to the heatsink. I hope to find out CPU temperature in Ubuntu Linux help you to keep your laptop healthy and use it for a longer time.