Get Some Prettified CPU Information in Your Terminal With ‘CPUFETCH’

This brief article will help you get ‘cpufetch‘ installed and running. cpufetch is like neofetch, except it’s for your CPU. It’s probably not the greatest information-gathering tool, but it is kind of neat and worth playing with for a little while.

Basically, it’s like neofetch but for your CPU. All-in-all, it’s not the most useful tool. What it is, is interesting – or at least I think so. I saw it on a Reddit post a few days ago and decided to play around with it. I liked it well enough to write this article. 

When I check the cpufetch man page, cpufetch describes itself as this:

Simple yet fancy CPU architecture fetching tool

That seems to be an accurate description and that’s good enough for me! You’re not going to be doing a whole lot with it, but it is fun to play with. It simply outputs CPU data formatted to look a lot like neofetch and that’s all it does. In fact, it outputs data that looks like this:

cpufetch in action
And, yeah, that’s all it does. Neat, huh? No? Well, I think it’s neat! Sheesh!

So, yeah, that’s all it does. As you can see, I used the -s switch with retro to change the styling. You probably won’t be too interested in anything beyond that, which is fine. After all, this article is really about just having fun.

Using cpufetch:

Well, first you’re gonna need cpufetch if you want to use it. So, you should probably do that first! There’s a chance that it’s already packaged for you, and you can check that at this link. If there’s a package for you, go ahead and install it like you normally would. Otherwise, you’re going to need to build it.

Building it isn’t too hard and I had no issues doing so a couple of times on different systems. The directions are right there on the GitHub page, but I’ll recreate them here:

You can, of course, copy the built ‘cpufetch’ file anywhere you want. You can use the following command to make it so that you can use the program from anywhere you want.

Having crammed it into /usr/bin means it’s accessible even when you’re in a different directory. You can just run ‘cpufetch’ and it’ll work.

Speaking of which, that’s all you need to do to run it. You just use:

However, you can go one step further and install it. This isn’t listed on the GitHub page, but you can actually install it to have a man page entry for it and the likes. To do that, instead of moving the cpufetch binary like above, you just tell make to install it. It looks like this:

With that command, it’ll be fully installed and run just like any other application that runs in the terminal. And, as mentioned, it even adds the man page so you can use that. That’s probably a better option than just stopping at the ‘make’ directions from GitHub.

The way the output is formatted takes up quite a bit of space, so it’s prettier if you make your terminal large enough to fit the formatted output. You can also check the man page to learn the few other options. From the few other options, I’ve decided that I prefer the retro style. To do that, it’s simply:

I found the formatting much nicer with the retro logo applied. You do you and decide which one you like best as you play with your new toy. It’s merely a matter of taste.

Closure:

And that’s it for today. You’re probably not going to need cpufetch in your day-to-day operations. In fact, there are better tools than cpufetch – and they’ll give you far more information about your CPU. In this case, I don’t think that matters. It’s just a fun way to see some of the information about your CPU in the terminal. It’s perfectly okay to just have fun!

As always, thanks for reading! Thanks for the feedback! The traffic has slowed down, which is fine by me. If you’re interested in helping, you can donate, write an article, buy cheap hosting, register to help, scroll down and vote or sign up for the newsletter down there, or you can leave feedback in the comments! Any/all of those are truly appreciated and either help keep me motivated, show me what you like, or help the site stay up and running. Until next time…

EDIT:

I found an ancient AMD box to try it on, just so I could generate the AMD graphics. It took a bit to remember I had that old computer, but it looks like this:

cpufetch with an old AMD CPU
You can click on these to make them larger and easier to read.

Repair Your Linux Filesystem With a Live USB or DVD

It’s possible for your filesystem to become so corrupted that you can’t repair it easily. In that case, you can repair your Linux filesystem with a live USB or DVD.

Your filesystem may become corrupted for any number of reasons. One of the most common reasons is an improper shutdown, where your filesystem doesn’t have time to properly write everything to disk because it wasn’t shut down properly. You might see that sort of thing when you suffer from a power outage. 

There are any number of reasons why your filesystem will have become corrupted and, in most instances, your system will automatically repair your Linux filesystem when you boot your computer.

It’s also possible that a simple boot won’t repair your Linux filesystem. In that case, your OS probably has some sort of recovery mode and you can use that mode to repair your filesystem. 

Once in a while, your filesystem may have become so corrupted that you can’t fix it in recovery mode because you can’t get to recovery mode to fix it. Not to worry. This is something you can easily do with a live USB or DVD.

This article assumes you already have a USB or DVD with an OS that runs live. I’ll use Ubuntu as the example OS, as it’s really common. Adjust for your distro and you’ll be okay.

Here’s a link if you need to know how to access your temporary boot menu

NOTE: If you’re using Btrfs, you shouldn’t need to run fsck, it should heal itself. If not, here are Btrfs-specific commands that you should learn.

Repair Your Linux Filesystem:

The first thing you’re going to do is boot to the USB or DVD. You’ll need to be patient as the live instance loads into RAM. Once the OS has loaded to a GUI, you’ll want to select “Try Ubuntu”. (Remember to adjust that for your own distro, should you not be using Ubuntu.)

Again, this will take a minute – especially on older hardware. Eventually, the GUI will load and you’ll have a functional live instance running. If you needed to use nomodeset, acpi=off, or anything similar, you’ll probably also need to use those things to get the live instance of Linux running.

The tool we’re going to use is known as ‘fsck‘, which is a tool in and of itself and a front end for other tools. fsck interacts with more specific tools for your specific filesystem, but that’s not important right now. 

If you’re curious, fsck stands for ‘file system consistency check‘ and the man page helpfully describes it as:

fsck – check and repair a Linux filesystem

Now that you have a functional live desktop, it’s time to repair your Linux filesystem. The first step is, as is often the case, opening up your terminal. You can use your keyboard to do this, just press CTRL + ALT + T and a terminal should pop right up.

At this point, you’ll want to identify the correct disk. To do that, you run:

You’ll want to identify the disk where you installed Linux. That’s the disk that has the corrupted filesystem that is preventing you from booting. It’s often something like ‘/dev/sda1’ or maybe even ‘/dev/nvme0n1p1’.

Once you have the disk identified, it’s time to repair your Linux filesystem. Enter this:

NOTE: Change the /dev/sda* to match the data from the fdisk command you ran earlier.

That ‘fsck’ command should find and fix any errors automatically. If you really know what you’re doing, you can run ‘fsck’ manually and maybe do a better job than the automatic method. Then again, if you know that much then I’d suspect you don’t actually need this article.

This shouldn’t take very long to run, unless there were a whole lot of errors. Next, all you need to do is reboot and you should find that you were able to successfully repair your Linux filesystem. To do that from the terminal, you can just type:

When prompted, remove the disk from the drive and press the ENTER button.

Closure:

There you have it, another way to run fsck and to repair your Linux filesystem when it is broken. This method works even when the recovery mode will have worked.

Thanks for reading! If you want to help, you can buy some cheap hosting, unblock ads, donate, sign up for the newsletter (below), write an article, leave a comment, register to help, or just vote for the article below and leave a comment!

How To: (More or Less) Learn if Your Hardware Will Work With Linux

One of the most frequently asked questions from new people is them wondering if their hardware will work with Linux. This article will help you find out if your hardware will work with Linux.

That’s right, this article aims to tackle a frequently asked question – but there’s some limitations and wiggle-room. That’s why the title of the article contains (More or Less). It’s not 100% accurate.

The usual, and most basic way to find out if your hardware will work with Linux is to simply download the .iso you intend to use, boot to it, and test it. If it works in a live environment, it probably will work when you install it. If you needed to add additional boot parameters (like nomodeset) to run the live instance, you’re probably going to need to do the same thing when you install Linux.

That works well enough, but it doesn’t tell you anything about long-term problems. It doesn’t tell you if there’s going to be an IRQ issue many hours after booting, it doesn’t tell you if there will be some obscure ACPI errors, and it doesn’t tell you exactly how well your hardware will work with Linux.

You can do better than that. With a little effort, you can learn all about your hardware and how well your hardware will work with Linux. It’s pretty painless and easy.

Learn If Your Hardware Work With Linux:

So, the first thing you need to do is download the .iso and write it to USB or to DVD. You can also do this after the fact, with an already-installed Linux. This article assumes you’ve got a running Linux and you’re connected to the Internet. 

It also assumes that you have a terminal window open. If you don’t have one open, you can probably open one by using your keyboard. Just press CTRL + ALT + T and up should open your default terminal emulator. Yes, this should work just fine even in a live environment.

The tool we want for this is ‘hw-probe’, put out by the good people behind linux-hardware.org. It is almost certainly in your default repositories and can be installed in the usual manner. For example, if you’re using a distro with apt, then it’d be installed with:

You’ll have to adjust the installation command for the distro you’re using. You may also need to use a root password, which will vary based on the distro.

You can also find it in Snap, AppImage, and Flatpak versions here.

Once you have it installed, you will want to run the following command (and know that you will be sharing this data with the linux-hardware.org project):

That will take a little while to run, but not terribly long. It will output some text similar to this:

The important bit is the “Probe URL”. For this particular run, you’ll see the URL is: https://linux-hardware.org/?probe=23182c745b

If you follow my example URL, you’ll see that everything more or less works – but that some of the hardware has some known problems. You can click through those to learn about what sort of problems you’ll have getting your hardware to work with Linux.

NOTE: Just because there are known problems doesn’t mean that the hardware doesn’t work. You need to click through and read the results to learn what sort of problems you’re potentially going to face. In some cases, the problems only exist with certain kernels (for example) and are resolved with newer kernels. Again, you’ll need to read through and verify the data. The data is pretty accurate, but the human element means it is not infallible. 

As you can now surmise, this isn’t 100% accurate. Quite often, there will be known problems but your hardware will work with Linux just fine – but maybe not at peak functionality due to an inferior driver. Be on the lookout for things like that.

What it does do is it gives you some more fine-grained information so that you can make a more informed decisions. It’s a guide, not a rule-book. At the end of the day, if Linux is up and working on your live instance, it’s probably going to work just fine when it has been installed.

Closure:

And there you have it. Another article in the books. This one helps you find out if your hardware works with Linux. If you have any ideas for articles, be sure to let me know. Don’t forget to share this article with your friends!

If you want, you can unblock ads, donate, sign up to contribute, write an article, or sign up for the newsletter below. (I should move that to the top. I’ll do that when I’ve given it enough time to see if folks respond.) Thanks for reading and there will be another article in a couple of days!

A Few Ways To Visualize Disk Usage In Linux

I woke up this morning, took care of things like showering and eating, and then meandered to my computer. Swishing the mouse back and forth brought the screen to life, where I was greeted by a message that my computer was out of space.

It turns out that a backup cron job seems to have gone haywire and I had nested backups on my internal disk drive that occupied a great deal of space. However, I had only a hunch and couldn’t see where the problem was.

The problem was, as it turned out, a folder in /home/kgiii – and it was helpfully named as a backup should – meaning the errant directory was /home/kgiii/kgiii.

Of course I’m not going to notice that! The directory name doesn’t look out of place! It looks like it belongs there, it looked perfectly normal, so it didn’t leap off the screen to tell me something was amiss.

Really, I’m definitely not going to notice it while catching up on everything I check daily and while still on my first cup of coffee! The directory was my username in a directory named my username. It might just as well have been microscopic.

Either way, I didn’t worry too much. I knew that I should have plenty of space and that I could probably figure it out pretty easily. After all, it’s easy to visualize disk usage in Linux. This article show you a few ways to visualize your disk space. It should also be a pretty short article.

Visualize Disk Usage:

#1 Baobab: 

Baobab is the first of the three, and the most unique of the three. It’s not that it’s particularly unique, it’s that the other two are really quite similar. It’s typically a part of the GNOME desktop, but can easily be installed most any system. If you’re using a distro with apt, it’s installed with:

You can open it up, drill down, and graphically see how your disk is being used. You can see which files and folders are taking up the most space. It looks like this:

baobab in action
My Documents directory is nice and empty. I should have taken screenshots sooner.

It’s really self-explanatory after you’ve installed and opened it. Baobab is named after the tree, and appropriately shows the drives and directories in tree format. Imagine that!

#2 K4DirStat

K4DirStat is typically used with KDE, but can be installed on most any desktop. It’s another handy GUI way to visualize disk usage. If you’re a recent Windows user, then it may remind you of WinDirStat as the two are visually similar. It’s easy enough to install. Again, if you use apt:

K4DirStat is pretty self-explanatory. Open it, select where you want to start investigating, and wait. Once open and/or you’ve drilled down, it looks like this:

KDirStat in action.
This one is pretty intuitive and fun to play with while viewing disk usage.

This one has been around for quite a while. You may already be familiar with it. These applications are all a little slow when opening, as they have a lot of data to load and calculate. So, you’ll need to be patient.

#3 QDirStat:

QDirStat is pretty much exactly the same thing as the above. It’s based on K4DirStat, but built with and for the Qt library. So, you’ll want to consider it as an option if you’re using something like Lubuntu which is now using LXQt. But, most modern Linux distros support Qt out of the box and you can install it with:

Visually, it looks much like K4DirStat. It’s a simple block view that shows you the file sizes in comparison with the files around it. It will also helpfully color-code files. It looks like this:

QDirStat in action.
As you can see, it looks a lot like the previous option. Not a whole lot going on there.

It’s pretty similar to a few other applications that do much the same thing. The main benefit for this option is that it is Qt and that’s fairly universal these days.

Also, it looks pretty cool if you’re looking at the entire drive with it. This picture isn’t really of any value, it’s just because it looks neat. Call it a bonus picture!

Full drive view with QDirStat
This picture serves no purpose, but the colors are pretty!

Closure:

If you’re curious, I used the QDirStat because that was what I had installed and ready to go. It didn’t take very long to figure out where the problem was. Once I knew where it was, I cracked open the terminal and removed the offending directory and the contents within. I then removed the offending cron job, with a note to myself to fix it later today. This resolved my problem quickly.

Had I tried to find it visually through the file manager, I’m quite certain that it’d have taken quite a bit longer. The name of the directory didn’t make it seem out of place. In fact, I’ve had a ‘kgiii’ directory right there in my home directory in the past. I stopped doing that when it got confusing, so now it’s a ‘tmp’ folder, though I digress. The point is, I’d have taken quite a while to figure this out had I not had the tools to hand and known how to use them.

Finally, I have a ton of notes from which to write articles, but sometimes real life gives me an idea for a different article, such as this one. If you have an idea for an article, you can go ahead and write it. You can also unblock ads, donate, sign up for the newsletter below, leave a comment, and more! Thanks for reading!

How do I ‘Boot to USB’? (Or CD/DVD, if Such is Available)

In order to install Linux, you need to be able to boot to USB (or CD/DVD – with USB being more common these days and many devices not even having CD/DVD drives). The goal of this article is to help you boot to USB or to optical media, so that you can install or repair your Linux system.

To install Linux you pretty much have to boot to USB or to a CD or DVD. It’s true, you can actually install directly from your regular disk drive, but that’s a convoluted method that few people will ever need. I may cover that method at some point, but today is not that day!

You may also need to boot to a live Linux instance for other reasons. Maybe you need to repair your installation? Perhaps you need to grow your partition because you have run out of room? Or, just maybe, you need to recover your data so that you can do a fresh installation – or so that you can start the recovery from your backed up data?

It’d be rather pointless to enumerate the many reasons why you’d want to boot to USB. There are many reasons and it’s a skill you’re going to need. Trust me, you need to know this stuff.

I say USB because that’s the most common today, but you may also need to boot to CD or DVD. Your hardware may actually be so old that it won’t even let you boot to USB. So, for the sake of this article, let’s just assume you’re booting to some form of external media, be it USB, optical media, or even an SD card. No matter what you’re trying to boot as an alternative media, the process is pretty much the same.

Booting to USB

Booting to USB, what’s the purpose? The purpose is to install or repair an already running system. It means booting to something other than your default internal drive (under normal configurations) and using that booted media to effect change on your system.

As I said above, there are many reasons why you’d want to do this. It’s a pretty common thing, especially among Linux users. There are many questions asked about this process and I’ve decided to document the methods here.

However, there’s no way I can possibly make this article truly definitive. In fact, I’d appreciate it if you’d help. In the comments section, fill in the blanks for me. You have hardware that I may not have access to, so you can tell us what works for your hardware and the article will be a more complete source of information. It’s your time to shine!

How to Boot to USB

In order to boot to USB, you have to have fairly good timing – or a willingness to sit there and pound on the same key over and over again. In a traditional sense, you’re aiming for a boot selection menu that you can access after POST (Power On Self-Test) and that split-second before the OS starts its boot sequence.

You’re not trying to access the BIOS, you’re trying to access the boot selection menu and there’s a narrow window to get it right. The good news is that the key to access the BIOS is different than the key to access the alternative boot menu. So, a good working strategy is to press the right key on your keyboard over and over again during boot while hoping for the best.

The question is, which is the right key? You don’t want the BIOS menu, unless you plan on changing it permanently. You only want the temporary boot menu, which another animal entirely.

So, I have a bunch of hardware. I also have a search engine. I’ve made an attempt to find the temporary boot menu keys and to document them all in one place.

The list of keys!

     Acer: ESC, F2, or F12
     Apple/Mac: OPTION
     Asus: F8 or ESC
     Compaq: ESC or F9
     Dell: F12
     HP: ESC or F9
     Lenovo: F8, F10, or F12
     MSI: F11
     NEC: F5
     Packard Bell: F8
     Samsung: ESC, F2, or F12
     Sony: F1, F2, or F3
     Toshiba: F12

NOTE: This list isn’t exhaustive nor is it completely accurate. In some cases, you may need to actually enable this in your BIOS. Samsung, for example, will not show the temporary boot selection menu unless you’ve first disabled “Fast Boot”. Other OEMs may require similar changes.

The above keys should get you into the temporary boot menu, where you can choose to boot to USB, CD/DVD, an external drive, a microSD card, or whatever. It’s an essential step in both booting and repairing your Linux computer. It’s a good idea to memorize it once you know which one works for you.

As I mentioned above, you can help. If you have a device that’s not listed, please let me know in the comments. Some manufacturers have more than one way to access the screen, so be sure to let me know if your device is different. The more data we get, the more people we can help.

Thanks for reading! As always, feedback is fantastic, you can sign up for the newsletter, and you can donate. You don’t have to donate. The site will remain online regardless, but you can help cover the costs. If I keep this schedule up, we should have a new article in two more days – so stay tuned!

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.