Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.


How to better monitor your Ubuntu Linux PC's temperature and voltage

If you have fans running too often or you want to improve how Linux uses your hardware, there's a simple command for that.
Written by Jack Wallen, Contributing Writer
Troubled man with smoking laptop computer
eyetoeyePIX/Getty Images

Recently, I switched from Pop!_OS to Ubuntu Budgie as my primary operating system. For the most part, the transition went fairly smoothly. There was, however, something interesting happening with my System76 Thelio desktop that I'd never before experienced. Once on a different OS, the fans ran constantly. This led me down a few rabbit holes before I could fix the problem. Ultimately, the issue was resolved by installing the System76 firmware that is required to properly control the fans. However, the process reminded me of a tool that can give Linux a boost with your hardware.

Also: The best Linux distros for beginners

You see, every motherboard contains various sensors that monitor things like temperature -- and the temperature of your PC is pretty important. Those CPUs can run very hot. If they overheat, your computer can crash (or worse). Because every PC manufacturer does things differently, and because PC internals vary from iteration to iteration, it's not always 100% certain that an operating system you install will pick up on every one of your motherboard's sensors. Most often, the OS installation does a good job but you might find (as I did) that your fans are running constantly, even when you're not using the machine.

Also: The best laptop cooling pads (that really work)

Should that happen, you need to use the sensors-detect command. Let me show you how it's done on Ubuntu-based Linux distributions.

How to install and use sensors-detect

What you'll need: The only things you'll need for this are a Ubuntu-based Linux distribution and a user with sudo privileges. 

1. Open a terminal window

As many Linux distributions do not ship with the necessary software installed, you'll need to add it manually. Open your desktop menu and select the terminal application.

2. Install lm-sensors on Ubuntu-based distributions

From the terminal window, issue the following command on a Ubuntu-based distribution:

sudo apt-get install lm-sensors -y

Once lm-sensors is installed, you're ready to use the sensors-detect command.

3. Running sensors-detect

At the terminal window, issue the command:

sudo sensors-detect

4. Answer the questions

After running the sensors-detect command, you'll be asked a number of questions, which include:

  • Some south bridges, CPUs or memory controllers contain embedded sensors. Do you want to scan for them? This is totally safe. (YES/no):
  • Some Super I/O chips contain embedded sensors. We have to write to standard I/O ports to probe them. This is usually safe. Do you want to scan for Super I/O sensors? (YES/no):
  • Some systems (mainly servers) implement IPMI, a set of common interfaces through which system health data may be retrieved, amongst other things. We first try to get the information from SMBIOS. If we don't find it there, we have to read from arbitrary I/O ports to probe for such interfaces. This is normally safe. Do you want to scan for IPMI interfaces? (YES/no): 
  • Some hardware monitoring chips are accessible through the ISA I/O ports. We have to write to arbitrary I/O ports to probe them. This is usually safe though. Yes, you do have ISA I/O ports even if you do not have any ISA slots! Do you want to scan the ISA I/O ports? (yes/NO):
  • Do you want to probe the I2C/SMBus adapters now? (YES/no): 

Also: How to install Linux on an old laptop

Answer Yes to all questions. When all questions are answered, it will ask if you want it to present a summary. Press Enter on your keyboard to display the results. Once the results are displayed, sensors-detect will then ask if you want it to automatically add the necessary items to /etc/modules. For mine, it lists coretemp as a module that I should add. Type Yes and those modules will be added. Do note, if sensors-detect lists a large number of modules, you should do a bit of research before allowing the tool to add them all. You might wind up adding modules that are already built into your installed kernel.

5. Reboot your machine

If sensors-detect added modules to /etc/module, you can go ahead and reboot so those modules will take effect.

And that's it! Hopefully, your operating system will now have better control over your hardware to improve the Linux experience.

Also: The most important reason you should be using Linux at home

Editorial standards