Checking cpu temperature linux

How to Check CPU Temperature in Linux

Open Terminal

To check CPU temperature, you have to open your terminal first by a shortcut key Ctrl+Alt+T or from the side icon of the terminal in the window. The terminal will be opened.

Update Linux System

For the installation of sensors, you need to upgrade your system apt by using any of the following commands:

It will ask your sudo password for the apt update to begin. Add a password to proceed.

After some time, you will be asked to continue your update process by taping Y or y in the terminal. Tap y or Y and press Enter to continue with the update process. After that, your system will start updating apt.

If you find some error while updating apt, try the below command to fix it.

You have to sit back and wait for some time because the Linux system will take a little longer to update apt.

Monitor CPU temperature

In a Linux system, the sensor instruction is executed to monitor, the current measurements of all sensor chips along with the temperature of the CPU. You need to check the already configured sensors on your Linux system. For this purpose, write the simple sensors command is appended below:

It will show you some information regarding system Adapters, chips, and CPU temperature. As it is clear that we don’t have any sensor regarding CPU temperature, installed on our system, so we need to install it first.

Search Sensors

To check for the temperature of CPU, SSD, and HDD, you need to install the hddtemp package and ls-sensors package as well. Now, you need to search for the sensors separately which are compatible with your system using the below simple search commands: You can see the available lm-sensors package and its specifications in the image.

Now to search for the compatible hddtemp packages for your system, try the below command. You can see the available hddtemp package and its specifications.

Install lm-sensors and hddtemp in Linux

After the successful apt update, you need to install lm-sensor and hddtemp in your Linux system. For this, try this apt command as follows:

It will ask for the sudo password to continue the installation of sensors. Add your password to continue the installation process.

Detect Hardware monitoring Chips

After some time, lm-sensors will be installed on your system, and you will be able to check the hardware monitoring chips which have already been installed on your Linux system. For checking this, try the sensor-detect command in your terminal as follows:

Again, it will ask you to enter your sudo password to proceed with this process. After that, it will affirm your action by asking you to type Yes or No. Type yes to continue detection.

This sensor-detect command will make sure that you will be able to check information regarding the already embedded sensors in CPU and hardware monitoring chips on your system. Now add the sensor command again to view the temperature of the CPU. If this does not work for you, try installing the Psensor package in your Linux system.

Читайте также:  Средства для восстановления загрузки windows

Install Psensor

The new update of Psensor also offers Ubuntu with an applet predictor, which makes it much simpler to control the device temperature on Linux. On the preview pane side, you can opt to show the temperature. Whenever the temperature reaches the threshold, it will also give a desktop update. Now, after enabling lm-sensor and hddtemp, we are finally able to install Psensor on Linux. Execute the below-appended command in the terminal to install Psensor.

It may ask to affirm your action by typing Y or y in the command terminal. Press y and continue. After a while, Psensor will be installed and ready to be used.

Navigate to the Menu bar of the Linux system, and search for Psensor. You will find the installed Psensor application in it. Click on it to open it and try using it.

You will see the graph and statistics of the CPU in the Psensor temperature monitor window.

To update preference, navigate to the top menu, and click on Psensor. Navigate to Sensor Preferences and update graph settings.

Checkmark the Active desktop notifications to get notified.

You can customize the Psensor display as well.

Direct to the top most menu and click on Psensor. Click on Preferences to update the unit of temperature. You can change it to Celcius and Fahrenheit as well.

Change graph preferences as per your choice from the graph bar.

You can enable the different provider’s support from it as well by check-marking the provider’s packages.

Configure CPU Temperature Indicator

Go to the Linux taskbar and search for Applets. Open it and install the CPU temperature Indicator on your system. Try configuring it and enabling it for the desktop. You will be able to see the CPU temperature on your taskbar, as indicated in the image.

Conclusion

Psensor is a GUI based customizable application to check CPU temperature on your Linux system. We have successfully configured and used it by using lm-sensors and CPU temperature Indicator.

About the author

Aqsa Yasin

I am a self-motivated information technology professional with a passion for writing. I am a technical writer and love to write for all Linux flavors and Windows.

Источник

How to check CPU temperature on Ubuntu Linux

H ow 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.

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Ubuntu Linux
Est. reading time 4 minutes

Procedure for monitoring CPU and HDD temperatures on Ubuntu

  1. Open the terminal application.
  2. Install the lm-sensors and hddtemp packages in Ubuntu using the sudo apt install hddtemp lm-sensors .
  3. Run hddtemp command to see SSD and hard drive temperature in Ubuntu.
  4. Execute sensors command to find out CPU temperature in Ubuntu Linux.

Let us view processor temperature including SSD/HDD in details for Ubuntu desktop or server.

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

  • 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:
sudo sensors-detect

Display CPU temperature in the command line

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

Simply type:
hddtemp
sudo hddtemp SATA:/dev/sda
Sample outputs:

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:
gnome-disks

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
Sample outputs:

sudo nvme smart-log /dev/nvme0
One can filter output using the grep command:
sudo nvme smart-log /dev/nvme0 | grep temperature

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

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.

Conclusion

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.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

How to Check CPU Temperature on Linux

Home » SysAdmin » How to Check CPU Temperature on Linux

Like any electrical component, CPUs generate heat when being used. Some resource-demanding programs cause the CPU to increase the clock speed, which results in higher temperatures. Dust buildup also causes the CPU to overheat.

High temperatures shorten the lifespan of sensitive components, so keeping track of CPU temperatures is crucial. This way, you prevent performance throttling or component damage.

In this tutorial, you will learn how to use different tools and in-built utilities to check CPU temperature on Linux machines.

  • A machine running Linux
  • An account with sudo/root privileges

Check CPU Temperature Using Lm-Sensors

Lm-sensors is a command-line utility for hardware monitoring. Use the tool to check the temperature of the CPU and other components. Follow these steps to install and configure Lm-sensors:

1. Open the terminal and install these packages using a package manager for your distribution. In Ubuntu, use the following command:

Wait for the lm-sensors and hddtemp to finish downloading and installing.

2. Execute the sensors command to see the CPU temperature. The output shows the current temperature readings of all sensors in the machine. The results include the temperature of each core and maximum thresholds.

3. To check SSD and hard drive temperatures, execute the following command:

The output shows the temperature of the selected disk.

4. To see which system components you can monitor, run sudo sensors-detect .

Answer YES to multiple scanning requests until the system scan is complete.

When the scan completes, the output shows the summary.

5. To ensure that system monitoring works, load the needed modules using the following command:

6. To run the sensors command repeatedly and get real-time data in the terminal, execute the following command:

The output refreshes every two seconds and displays the current CPU temperature reading.

Note: To check CPU usage on Linux, read our tutorial on How to check CPU usage.

Check CPU Temperature Using Psensor

Psensor is a GUI app that allows you to monitor the temperature of various system components. This utility also allows you to monitor CPU usage and fan speed.

Psensor includes an applet indicator for Ubuntu, allowing you to display the temperature in the top panel to notify you when the temperatures get too high.

Install Psensor

Before installing Psensor, you need to install and configure Lm-sensors.

1. Run this command to install the necessary packages:

2. Next, scan for sensors in your machine:

Answer YES to any scan requests until the scan is completed.

3. To make sure the packages are installed, execute the sensors command.

4. Update the package repository with sudo apt update .

5. Install Psensor using the following command:

Answer YES and wait for the installation to finish.

Using Psensor

Search for Psensor in the app menu and open the utility. The app displays a graph of the selected values and shows the CPU temperature, CPU and memory usage, free RAM, GPU temperature, and HDD temperature.

To configure Psensor and set which stats you want to see, follow these steps:

1. Click Psensor in the menu bar, followed by Preferences.

2. Check off the boxes for the options you want – whether Psensor launches on system startup, the update interval, graph colors, etc.

3. To show CPU or HDD temperatures in the top panel, go to Sensor Preferences under the Application Indicator. Enable the Display sensor in the label option.

Check Temperature Without Third-Party Utilities

There is a way to use the in-built utilities to check the CPU temperature if you don’t want to use third-party apps.

1. To check the CPU temperature without installing a third-party app, use the following command:

The output shows the CPU temperature in the five-digit format. Here, 49000 means 49C.

2. If you get several thermal zones and different temperatures, execute the following command to see what a single thermal zone represents:

For example, run cat /sys/class/thermal/thermal_zone2/type to see the type of thermal zone 2.

The CPU temperature is in the zone labeled x86_pkg_temp.

3. To see what all the thermal zones are referring to, use:

The output shows the last stored temperature for that thermal zone in degrees Celsius. In this example, there is only one thermal zone, labeled x86_pkg_temp, which represents the CPU temperature.

You now know how to check CPU temperature on Linux using various utilities. The guide also showed how to configure the tools to display other information, such as GPU and HDD temperature.

Источник

Читайте также:  Atitool для windows 10
Оцените статью