How To: Check CPU Temperatures

This is obviously about Linux and, given that it’s Linux, there are often multiple ways to accomplish things. This is one way to check the CPU temperatures.

This one should be fairly short and straightforward. Once again, crack open your favorite terminal emulator with CTRL + ALT + T.

For this exercise, we’ll be using lm-sensors. Wikipedia helpfully describes it as thus:

lm_sensors (Linux-monitoring sensors) is a free open-source software-tool for Linux that provides tools and drivers for monitoring temperatures, voltage, humidity, and fans. It can also detect chassis intrusions.

It then promptly says that a citation is needed. 

So, let’s check the man page. man lm-sensors has no entry, so you’ll need the slightly less obvious man sensors. In this case, the description is not much greater.

sensors is used to show the current readings of all sensor chips. sensors -s is used to set all limits as specified in the configuration file. sensors –bus-list is used to generate bus statements suitable for the configuration file.

Alright, so let’s get this installed. 

So far so good, but now we need sensors to find the hardware and that’s done with this:

That’s going to run and it’s interactive. You’ll need to type “YES” over and over again and then finally hit the ENTER button. But, once you’re done, it’s all over and you never have to do it again – unless you add/change hardware that has sensors.

Now that it’s installed, you can just run:

If you are easily startled by the metric system, you can just add the -f switch for Fahrenheit, like so:

 

Congratulations! You can now easily tell how hot (or cold) your CPU is running. You should also look up your CPU’s temperature thresholds. This way you’ll be able to tell if your CPU is running hotter than it should be running. Doing this can save your hardware or give it greater longevity.

The newsletter works again. You can now sign up and get notified of new articles. It’s painless, and I promise I won’t send you any spam –  nor give/trade your email address with anyone for any purpose. (Frankly, I have zero motivation to do so.) If you had signed up previously, you’ll need to do it again, for I am lazy and there was no export and import options. Thanks for reading! (Also, I hope you like the font change!)

Smash a Button
[Total: 0 Average: 0]
About Me: I'm just some retired dude with a little bit more free time on my hands. If you want to support the site, why not help yourself out too by ordering some inexpensive web hosting so that you can start your own site?


Install the non-Snap Version of Chrome/Chromium

So many questions are answered by telling people to skip the snap version and to install the .deb/PPA versions. This is how you do that for Google Chrome and Chromium. Chrome and Chromium are browsers from Google and Chrome is based on Chromium but has more features inside it – and isn’t open source. Chromium is open source, and many other browsers are based on it.

This, like many of my articles, is going to be fairly limited in scope. It’s only really useful if you’re using Debian derivatives like Ubuntu, ElementaryOS, or Mint. In fact, part of it will only apply if you’ve enabled PPAs on your computer.

PPA, if you’re curious, stands for Personal Package Archive. Rather than beat a dead horse, I’ll just suggest that you visit this site to learn more about them. It should be noted that PPAs were initially meant for testing and many consider them to be a security risk because you’re essentially letting someone else decide what gets installed on your system without the oversight of the official project. Anyone can make a PPA and advertise it.

Anyhow, back to the topic at hand. The process is different for both of them and so we’ll go ahead and get started with Chrome.

Chrome:

Chrome is going to be the easiest. Crack open your terminal with CTRL + ALT + T and enter the following:

Tada! You’re done. When you finish it up and start Chrome, you’ll get to set it as the default browser and stuff like that. On top of that, it will automatically update with the system – as it adds its own repository.

chrome repository

Note, the new repository contains the beta version as well.

Chromium:

Chromium is a bit more complicated. For this one, you’ll need to add a PPA first. Once again, open your terminal with CTRL + ALT + T.

Now, let’s add the PPA.

Yes, I know it says beta. Also, any modern distro should do this for you, but you may need to first update the database of installable packages.

Once that’s done, or if you don’t need to do so, you can go ahead and install Chromium.

Then, much like with Chrome, you will have a regularly updated version of Chromium at your disposal. Like always, go ahead and subscribe to be notified of new articles. I promise, I won’t send you any spam or give your email addresses away.

 

Smash a Button
[Total: 0 Average: 0]
About Me: I'm just some retired dude with a little bit more free time on my hands. If you want to support the site, why not help yourself out too by ordering some inexpensive web hosting so that you can start your own site?


Put it all Together

This is just a quick article that may show one of the reasons I write this material. We’re just going to put together a couple of pages from this site in an example of real-world use.

So, if you remember, I told you how to use dpkg to get a list of installed applications. The command I used on that page was:

Well, the output from that is more information than I really need. It looks like this:

That’s plenty informative – but I want just the name of the applications. Sure enough, we can use ‘AWK‘ to do this. 

On that page, we have this command:

So, let’s mix the two together! We can do that!

Let’s see… I’ll obviously need to change the paths and file names. Coincidentally, I’ll not need to change the column (the bit about { print $2 }) because I still want the second column. 

What does it end up looking like?

Now, navigate to your documents folder and open InstalledApps.txt with your favorite text editor. You’ll see that it looks a bit like this:

You’ll still have some unwanted text at the top of the page, but it works well enough to get the job done. It’s reasons like that which motivate me to write this material.

Smash a Button
[Total: 1 Average: 5]
About Me: I'm just some retired dude with a little bit more free time on my hands. If you want to support the site, why not help yourself out too by ordering some inexpensive web hosting so that you can start your own site?


Fun With The ‘AWK’ Command

Today, I’ll show you a real-world use of the venerable AWK command. I use the AWK command fairly regularly.

First, a little about AWK. The AWK command has been around since 1977 and is named after the three people who wrote the original version: Alfred Aho, Peter Weinberger, and Brian Kernighan. It was first officially released in Version 7 Unix (V7) and has been a valuable text processing program ever since.

This is just one instance of how I used it to process some text.

I was going through the statistics at the Music For Us site. Among the statistics is a list of countries from which MFU has had visitors. Given the age of the site, it’s a fairly long list.

The format of the text was as follows:

I only cared about the name of the countries, but it was a very long list (more than 100 entries) and I didn’t want to edit them out manually. So, it was a pretty easy decision to use AWK to process it.

First, I copied the text into a document called ‘countries.txt’. I then opened my terminal and headed to that directory. This was the command I used:

So, I basically told it to use AWK to process countries.txt, to extract the second column, and to write that data to a file called finished.txt. In this case, I could have easily extracted any of the columns without much difficulty. You simply need to change the $2 to whichever column you want.

If you’d like a full explanation of the command, you can actually check it out on one of my favorite sites, explainshell.com. (That link will take you directly to the explanation of this specific command.)

Anyhow, the output was as expected. It looks like:

(If you want to see the full list, check out the paste here. By the way, you can feel free to use that site for your own paste needs. We have our own free pastebin service.)

I guess the final verdict is that Linux really lets me be lazy! Instead of processing that text manually, I used the AWK command and processed it all in less than a second. I didn’t have to sit there and copy/paste. I didn’t have to spend the time verifying it. I just had to run one simple command and I had the data I needed, nice and neat.

The thing is, I really only need the basics so I have giant holes in my knowledge – and yet, I know enough to do things like that, making my life easier. There’s always so much more to learn, and that’s awesome.

Smash a Button
[Total: 0 Average: 0]
About Me: I'm just some retired dude with a little bit more free time on my hands. If you want to support the site, why not help yourself out too by ordering some inexpensive web hosting so that you can start your own site?


How To: Uninstall the Default Music Player in Elementary OS

The default music player in Elementary OS is kinda lame. There are many better choices. Once you’ve chosen one, this is how you remove the default music player in eOS.

This was asked on a forum that I visit and I took the time to find the answer. I figured that I’d not been able to easily find the answer with a search engine, so I might as well turn it into an article. It’s actually pretty simple.

eOS lacks any handy GUI system monitor that I could find, so I installed one. You might as well do the same. With eOS, you’re eventually going to want it – though top or htop or even atop do the job just as well. Anyhow, I installed one and found that closing the “io.elementary.music” process closed the music player. Obviously, you can’t uninstall that. It’s part of some bigger package and eOS does things in unusual ways.

With further digging, I finally noticed an application called ‘noise’ in the list of running processes. Killing it would kill the music player, just like killing the io.elementary.music process would. Finding this out pleased me.

It was actually pretty neat when I ran that command. It uninstalled the default music player but the dock still had the music player icon showing – and the command made that icon fade into a partially transparent icon. Slick move, eOS. Slick move…

At that point, I just decided I’d reboot. Y’all know how to do that already, but let’s do it from the terminal.

Or, if you want,  you can put them all together with one grand command that looks like this:

Press the enter button, type in your password, and go grab a snack – but just a quick one as it won’t take long before you’re back at the login screen without the default music player installed any longer.

Smash a Button
[Total: 1 Average: 4]
About Me: I'm just some retired dude with a little bit more free time on my hands. If you want to support the site, why not help yourself out too by ordering some inexpensive web hosting so that you can start your own site?