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!

How To: Generate a List of Installed Applications in Linux

Before making this site, I had a similar article that explained how to list installed applications in Linux, but it was only relevant to those that used distros with ‘dpkg’. This expanded article will explain how to generate a list of installed applications for multiple distros, in order to be more complete.

There are any number of reasons why you might want a list like this. Maybe it’s for compliance reasons, needing to know everything installed on the machine. Maybe it’s for making a manifest to establish a baseline for future installs. You could also just be curious, need a list for support questions, or want a list for backup purposes.

Whatever your reason, you can generate a list of installed applications fairly easily. You can also do a couple of other neat things that I’ll explain below.

Generate a List of Installed Applications:

For all of these commands, you’ll want a terminal. You can probably open your default terminal by using your keyboard to press CTRL + ALT + T. If that doesn’t work, you can just open it from a menu or whatever shortcut you’ve set up for yourself. (I’m looking at you, you people with strange window managers!)

The command you’ll use will vary depending on your distro. I’ve got a few of them covered below. In some cases, you may need elevated permissions, so a ‘sudo’ in the front of the commands should do the trick for you.

Debian (& dpkg using distros):

If you’re using Ubuntu, or a distro with snaps, you can list those with:

If you’re using flatpak applications with any distro:

Arch (& Mandriva, etc.):

RHEL (& Fedora, etc.):

OpenSUSE (& derivatives):

Those are the major distros. There are smaller distros, independent distros, and they’ll have their own package management systems and ways to make a list of installed applications.

Bonus:

You can actually do a few things with this listing. Two immediately come to mind and I’ll share them.

First, you can count them. At the end of each of these commands, you can pipe it and count the lines. It may not be a 100% accurate number, but it will be pretty close. (Some of the commands output more than just a list of installed applications.)

That’ll give you an output similar to:

You can also write the list of installed applications to a text file, to save for archiving or whatever. I like to make a list now and then and check against it when I do a new installation. Your reasons are your own, but here’s how:

The .txt isn’t mandatory and you can write the file to anywhere you want, assuming you have the correct permissions. It’s your list, you can do anything you want with it!

Closure:

And, there you have it. You can now make a list of all applications that you’ve installed. You can even count the list, and you can write the list to a file for storage. If you want, you can generate a list of installed applications on one computer, generate a list of all applications on a second computer, and then use ‘diff’ to see what the differences between them are. There’s all sorts of things you can do with this list.

As always, thanks for reading. Your reading and feedback help me stay motivated. My goal is to keep up this publication rate for a year, though we’ll see where we are when that year ends. I have enough notes for that, and more. 

If you’d like to contribute, you can unblock ads, you can sign up for the newsletter, you can write an article, you can donate, and you can register for the site to regularly contribute. You can also comment, vote for articles you do like, and share this site/page with others via social media! You can even buy inexpensive Linux hosting! Alternatively, you can even just enjoy the articles. It’s all good!

What is my Hostname in Linux?

For most of you, your hostname in Linux is going to be the same as your username. This article will help you figure out your hostname in Linux, and it should be a relatively short article. If this article looks familiar, it’s because it existed at the old site, but with far less information.

Let’s start at the beginning, by learning what a hostname is.

A hostname is generally meant to be a human-readable way to identify a computer. Yes, the computer is truly identified by the associated IP address, but the hostname resolves to that computer. It is meant to be easily remembered instead of having to remember a bunch of IP addresses. Without it, the web (and your own local networks) would be more difficult to navagate.

In many instances, it’s a FQDN (Fully Qualified Domain Name), such as a domain name like linux-tips.us. However, this site doesn’t have a dedicated IP address, so it’s known by a virtual hostname as a FQDN. If the site had been constructed differently, you’d be able to access it with the IP address. For example, https://172.217.10.14 will take you to Google (after some warnings).

So, your hostname in Linux isn’t always going to be the same as your username. For most of the readers here on L-T.us, it will be. You probably don’t really need to worry a whole lot about things like virtual hosts and stuff like that. But, even as a home user, you can make use of this information.

How is it useful? Well, if I want to SSH into my MSI laptop, I don’t have to use the IP address. Not only that, if the IP address changes then I don’t need to look it up. I just connect with something like:

You may notice that I added the .local. You too can just add .local with many distros, in others the default might be something like .localdomain – which you can keep as the default or change it easily enough.

So, let’s figure out how to find your hostname in Linux.

Find your hostname:

Let’s start by cracking open the terminal. You can use your keyboard to do this, just press CTRL + ALT + T and your default terminal should open up.

Now, we can try the following:

Or you can try:

Or you can also try:

As near as I can tell, one of those should work on all major distros. If it none of them work for you, please leave a comment letting me know what does work – helping those who come behind you.

Using Your hostname in Linux:

There are a number of ways that this information can be used. With many distros, as mentioned above, you can add .local to the hostname and just use that instead of IP addresses. Here’s a picture that shows a few examples:

using hostname in Linux
Instead of using the IP address, use the hostname. It’s a pretty handy feature.

There are, of course, other things you can do with this information. Those are just a few examples. The great thing about using a hostname in Linux is that you’ll not have to recall IP addresses. You’ll only need to recall a name – a name that you picked.

You can change your hostname, but that goes beyond the scope of this article. I’d expect to see an article about that in the future! In the meantime, if you can think of any ways that you’d use the hostname, please leave a comment.

Closure:

Thank you, my dear reader, for your viewership. Your comments and feedback keep me motivated and your feedback helps to improve this site. For those who have been keeping track, you can actually now click on large images to see the larger versions. This will only be for future articles, as I’m unlikely to go back through every previous article and change it. But, it was direct feedback that resulted in the change.

If you’d like to contribute, there are a number of ways. You can donate, write an article, unblock ads, buy hosting, and sign up for the newsletter. I promise, I’ll never share your email address with anyone and I won’t send you any spam. Until next time…

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!

A Few Ways to Determine Which Distro and Version You’re Using

This article will show you a few ways to determine which distro and version you’re using. There are many ways to learn this, but these are three easy ways to tell.

There are any number of reasons why you might not know this information off the top of your head. Perhaps you’re working in a multi-platform job? You might have many devices. It’s possible that you may have a bunch of virtual machines, each different. One can’t always tell by just looking at the desktop, especially if you’ve done any customizing.

Additionally, you may have upgraded and not know things like the point release. You may have different versions across your network, each for its own purpose. You might just be forgetful and so you’ll need to determine the distro you’re using, as well as which version of that distro you’re using. You might be in a position where you need support, and being able to share this information is essential.

No worries, there are a few easy ways to determine which distro you’re using. All of them are pretty easy.

Determine Which Distro (and Version):

All of these methods will rely on the terminal. So, before you begin, you can open your default terminal emulator by using your keyboard and pressing CTRL + ALT + T.

Once you have that open, you can try any combination of the following:

Method #1

The first method will involve a program known as ‘neofetch‘. Many distros actually provide this by default. If not, it’s probably in your default repositories and you can install it pretty easily. For example, with a Debian-based, or APT-using distro, the command to install it would be:

Once installed, you can simply run it with the name of the application. No modifiers are required. You simply run:

You’ll get an output similar to:

neofetch in action
This should be entirely self-explanatory. You can do more with neofetch, by the way.

See? Nice and easy. The information to determine which distro you’re using is right there in the output and on the top-most line.

Method #2

The following two methods need no additional software. You simply need to run the command in the terminal. 

The first of these two methods is:

Which will give you an output similar to:

Again, this is self-explanatory. The top-most is the major name, the second is the version, then the release number, and then the codename. With this information, you can determine which distro you’re using.

Method #3

Your distro may not have any LSB data and may not contain that information. That’s okay, there’s still one more command for you to try. Again, you don’t need to install anything, it just works out of the box.

This time, the command you’ll be running will be ‘cat’ and you’re looking for release data in the /etc directory. The command looks like this:

Your output should look similar to this:

As you can see, that contains a ton of information, including where to go for support and where to file bugs. 

Closure:

One of those is bound to work for you. I checked across a number of virtual machines and was able to determine which distro each was using. In many cases, all three of them will work for you.

At the end of the day, you can probably just pick your favorite (or the one that works) and commit it to memory. Personally, I try the ‘lsb_release -a’ first, as that one is firmly locked in my memory.

Like always, thanks for reading. I love the feedback folks provide, either here or at one of the sites I frequent. You may have noticed that I am now the owner/moderator of the LinuxTips Reddit Sub. If you frequent Reddit, and you’re interested in helping out, just drop me a note on Reddit and I’ll get you set up as a moderator there.

Of course, you can also unblock the ads used here. You can sign up for the newsletter. You can donate or write an article. There’s a few ways you can help keep this site going, or show your support. I currently write a new article every other day, though I’ve been considering increasing the frequency. Either way, let me know in the comments what you think of any of this stuff. I’m always curious about your thoughts regarding this site.

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.