Show Installed Kernels In Ubuntu

Today’s article should be fairly short and straight to the point, as we discuss how to show installed kernels in Ubuntu. This isn’t a very complicated thing and we’ll be showing these kernels in the terminal. Sure, there are GUI tools you can use, but you might as well learn to do this in the terminal.

A lot of people ask the question, “What is Linux?”

Well, Linux is just the kernel. The kernel schedules tasks, interfaces with hardware, and generally manages the stuff that goes on at a lower level. This is surrounded by GNU’s tools and you will generally add a window manager and desktop environment on top to turn it into a useable desktop system with a fancy GUI.

You might enjoy reading this article:

The “Linux” or “GNU/Linux” Debate

Under all that is the kernel. It’s very important! Without it, we’d have no Linux. There are other kernels out there, but the topic of this site is Linux Tips. But, without a kernel, your computer would be dead in the water. 

In the course of updating your system, and depending on how you do your updates, you’ll install new kernels as they are released. GRUB will default to the newest kernel in most configurations, but there are other kernels installed and those can be selected from an advanced menu during the boot process.

Unless you have a brand new install that hasn’t been updated recently (kernel updates are common), you’ll have more than one kernel installed. Even if you upgrade Ubuntu in the terminal, even if you use ‘autoremove‘, Ubuntu will store the previous kernel. This is a good thing, as you can boot to that kernel if the new one should give you trouble.

It’s sometimes necessary to wait out a kernel version because it doesn’t run properly on your system. That’s not common, but it does happen. When that does happen, you should update manually and control what software is removed so that you don’t remove the working kernel and can still have a usable system. It happens, it’s just not all that common.

By the way, the kernel is mostly worked on by paid developers these days. The current kernel has more than thirty million lines of code. Of course, it contains drivers for hardware new and old and those folks using the older equipment will scream bloody murder if you remove their drivers from the kernel. Still, stuff gets culled regularly – it’s for the good of the herd! Maintaining all that for three users is asking too much.

What have we learned?

We’ve learned that the kernel is important and kind of what it does. We’ve also learned that you have more than one kernel installed. Additionally, we’ve learned why that’s a good thing. So, we’re doing okay so far!

Show Installed Kernels In Ubuntu:

As the first paragraph said, you’re going to need an open terminal. This is true for most of my articles. You should know how to open a terminal by now. If not, press CTRL + ALT + T and hope for the best! That keyboard shortcut is not quite universal, but fairly close.

These instructions are going to work in Debian, Ubuntu, Mint, etc… At least one of them may work for other distros. I can’t say that I’ve tried recently and I’m not going to make any claims. Where we use ‘dpkg‘, that’s going to be exclusive to those distros with dpkg – the Debian Package Manager.

Seeing as I mentioned dpgk, we can start with that command first. If you want to show installed kernels in Ubuntu using dpkg, the command is simply:

That might look something like this:

showing the installed kernels in Ubuntu
See? There are multiple kernels installed at this point on this particular system.

If you search the ‘net, you’ll find there are all sorts of ways to do this – including some fancy commands that use egrep and show colors. I don’t see any reason to include those. What we have here works.

If you want, you can also use the find command. That’s a nice and handy command and I suppose this command might work on other distros. To show installed kernels in Ubuntu using the find command, try this command:

That should list your installed kernels quickly and without any fuss (and no muss). There are all sorts of ways to find this information but we’ve just covered the two quickest and easiest ways I can think of (in the terminal). It’s probably quicker in the terminal than it is for any other method, especially if you’ve always got an open terminal (or three).

Closure:

Well, there you have it… You have learned how to show installed kernels in Ubuntu, a useful skill to have (especially if you’re having kernel issues). These are easy enough to remember commands, or you can always use this site’s search function to find what you need. I do that myself. I’m always referring to articles I’ve written and the search function isn’t great but it does work.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Increase The Volume Of Thunderbird Notifications

Today’s article is one of a personal nature, an issue that affected me personally, where I needed to increase the volume of Thunderbird notifications. It was a bit of a problem and one easily resolved – at least in my case. I think it will be trivial to overcome this for others and thought that I’d make a quick article about this.

Thunderbird is an email client. The Thunderbird email client is brought to you by the same people, that is Mozilla, that brings you the Firefox web browser. As far as graphical email clients for Linux goes, you’re probably better off using Thunderbird.

This article is specifically about the calendar. It is only applicable if you have the calendar (sometimes called Lightning) installed. Further, it is only applicable if you then also have it set to chime an audio file when a scheduled activity is due. If none of those things are true, this article is not meant for you.

I don’t allow most audio notifications, but I do rely on Thunderbird for scheduling and noting appointments. If you’ve configured Thunderbird to show notifications and to create a sound to denote those notifications, you may notice that the notification is quieter than you’d like.

I searched for a solution for the low volume of Thunderbird notifications. I had a solution in mind, but I looked for something more graceful. The goal was to find something ‘in-app’ that let me set the notification volume. Not only was I unable to find a solution in that direction, I was unable to find anyone suggesting this path to increase the volume of Thunderbird notifications.

I’ll be giving directions for Debian (and derivatives such as Ubuntu, and all official Ubuntu flavors, Linux Mint, ElementaryOS, and such) but you can adapt these directions for your needs. The tool we’ll be using is ‘Audacity’ and that’s probably going to be in everyone’s default repositories.

If you’re unfamiliar with Audacity, the application is used to edit audio. As a general rule, I don’t bother with full-fledged DAWs and prefer the simplicity that Audacity offers. So, I guess that does make it my DAW of choice.

Odds are good that you don’t have Audacity installed by default. Again, assuming you use a distro with apt, you’d simply install Audacity with the following command:

If you’re curious, the man page describes it like this:

audacity – Graphical cross-platform audio editor

That’s a fine description and Audacity is the only tool you’ll need to increase the volume of Thunderbird notifications. As near as I can tell, this will work on default sounds or the sounds you add as your notification sounds.

So then, let’s get on with it… Let’s learn how to…

Increase The Volume Of Thunderbird Notifications:

If you read the intro correctly, or at least as how I expected it to be read, then you should have already installed Audacity. You can do this with any DAW (Digital Audio Workstation) but Audacity is quick and easy, easy enough for me to use.

So, I’ll assume you have Audacity installed.

You can do this with Ocenaudio. If you want a full-blown DAW, you can do this in Reaper. You have choices, but these directions are for Audacity.

Your first step is to open your file manager. With your file manager now open, double-check in Thunderbird to see where your notification sound file is located. It’s in the Settings menu, under the Calendar settings.

Thunderbird's notifications settings.
This should be fairly easily explained. A picture is worth 1,000 words!

As you can see, I’ve chosen a custom audio file. The process is the same. You need to find the file in question or add your file. If you wanted to you could root around and find the default file, but I suggest adding your own.

Once you have found the sound file, right-click on it and open it in Audacity. You can also open Audacity and then open the file by clicking on File and then Open. Both should work on most distros.

You’ll then see a screen that looks similar to this:

We'll increase the volume with Audacity.
That’s the waveform of my ‘cymbals’ notification chime.

What you do from here is right-click on any part of the spectrum shown in the image above.

You then press CTRL + A to select the full file.

You next click on Effect and then you click on Amplify. Adjust the amplification to suit and use the preview button to judge the volume level you’d like to achieve. That screen would look something like this:

Using Audacity to control the reminder sounds from Thunderbird.
If you want to hear your Thunderbird notifications easily, this is how you do it.

This works with more than just increasing the volume of Thunderbird notifications. You can raise and lower the volumes of almost any sound file quickly and easily. Rather than mucking about with some Thunderbird extension, you can just raise the volumes yourself.

Closure:

I’m not sure how many folks will be helped by this article, but I hope it’s some. This was an itch that I needed to scratch and this was how I went about doing so. I figured I’d share that with you by making it into an article. That seemed like a reasonable choice at the time.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Install A .deb Package In The Terminal

Today’s article is a basic article where we discuss how you can install a .deb package in the terminal. It isn’t all that complicated and there is almost always more than one way to accomplish things, especially when it comes to the terminal. If you want to install a .deb package in the terminal, this article is for you.

Obviously, this article only applies to distros that use the aptitude package manager, or ‘apt’ for short. These are generally the Debian-based distros. You’ll find that apt is used in Debian, Ubuntu, Linux Mint, ElementaryOS, and many more. It’s a pretty common theme among the more commonly mentioned desktop distros.

If you type man apt into the terminal, we get the following:

apt – command-line interface

That’s not very helpful, but it does give us some clues. It’s a command-line interface (often called “CLI”) for the package management system. If we read the man page a little further, it goes into more detail.

apt provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get(8) and apt-cache(8).

See? That’s a bit more helpful. When you’re reading the man page for an application, it’s a good idea to read the description portion of the man page. It explains a great deal, more often than not.

We will also be using ‘dpkg’ in this article. The man page (accessed with man dpkg) describes it accurately enough:

dpkg – package manager for Debian

Where apt is a “high-level” application, the ‘dpkg’ application is considered a “medium-level” application. The ‘dpkg’ application may be used by a higher-level application, providing a more stable command set and being used behind the scenes.

As a previous article about installing .deb files didn’t mention it, I figured it’d be worth an article of its own. I’ll still include installing software with apt, just so the folks arriving by search engine needn’t view multiple articles.

If you don’t already know, “.deb” files are packages for installing software. They adhere to the standard and are standard ar formatted archives. They’re meant to be used for installing software on your system, especially when you don’t have that software in your repositories. They often contain changes to system configurations and do the aforementioned software installations, so you need elevated permissions to run them.

If you’re curious about what’s inside, I wrote an article about that.

Extract Files From .DEB Files

For most users, they’re not all that interesting on the inside. You can extract them (even graphically) to see what’s on the inside. You can also use the extracted files if you can find a use for them.

So, today we’re going to learn how to extract a deb package from the terminal. We’ll cover a couple of different ways. If you want to do this graphically, you can do that. I’ve written another article about installing .deb files (not quite like this one) and the second section covers doing this graphically.

How To: Install .DEB Files In Ubuntu

With all that said, and hopefully understood, let’s get to it!

Install A .deb Package In The Terminal:

As the title implies, this is installing .deb packages in the terminal. To do this, you’ll need an open terminal. If you don’t know how to open a terminal, you may wish to learn. A terminal is a handy tool and you can usually open it by pressing CTRL + ALT + T.

With your terminal open, the absolute easiest way to install a .deb package in the terminal is to use that apt command mentioned earlier. It’s very simple:

Frankly, that’s probably the best choice. Using the higher level apt means that any dependencies will be sorted – if they can be sorted. If they’re not able to be sorted by downloading them from the default repositories, the application will fail gracefully and throw an error message. At that point, you can try to resolve the dependencies on your own, but that can be a pain in the butt.

Note the use of a full path. If you use apt, you must supply a path – something like ./foo.deb, ~/Downloads/foo.deb, or even /home/Downloads/foo.deb. Without a path, apt will not find the .deb file.

Anyhow, you can also install a .deb package in the terminal with the dpkg tool. It’s possibly a bit more complicated, but the syntax is as follows:

This is often adequate, but not always. The limitation is that the dpgk command doesn’t automatically resolve dependencies. It is because of this that I seldom recommend using dpkg and prefer to suggest using apt.

Never fear, this is still not lost. You can trivially resolve the dependencies (if they can trivially be resolved) with the following command:

That command will go through your installed software and try to fix (-f) any missing dependencies. If there are no dependencies needed, you do not have to run this command after installing packages with dpkg. 

Though, as you can see, it still relies on using apt. My thinking is that you can save all that hassle by just using apt in the first place. But, it’s your system. You have options when you want to install a .deb file in the terminal. It’s worth the article just to let folks know.

Some folks still recommend installing with dpkg and then running the apt command to resolve dependencies. I do not know why. If you have any good ideas about why, do feel free to let me know in a comment.

Closure:

Well, there you have it. You have yet another article, and yes it’s another one that relies on using the terminal. There are GUI tools that happily take care of all of this for you.

There’s no need to use the terminal to install software, but I prefer it. It’s just as quick for me to type out a command as it is for me to open software, type my password, and then click a button or two. It’s probably faster for me, as I always have a terminal open.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Dealing With “Could not get lock /var/lib/apt/lists/lock”

Today’s article is a rather specific article, where we examine a couple of ways to deal with the message “Could not get lock /var/lib/apt/lists/lock”. This is an error message that you’ll get when something is already updating (or installing) and you try to install something else or if you try to perform updates.

Basically, when you update something, apt will lock a file so that nothing can interfere with it. This is a good thing, ensuring your updates go smoothly. This is something you want to have to happen.

However…

Things don’t always go according to plan. Things may freeze, things may take too long, and things can stop the upgrade (or update, let’s use those words largely interchangeably). You may find yourself coming across this message and not knowing what to do.

A bit on update and upgrade

First, obviously, this article only applies to distros that use ‘apt’ as their package manager. So, that’s Debian, Ubuntu, Mint, and many more that are derived from Debian or Ubuntu.

You have on your computer a database of software available in the repositories you’ve enabled. Then you update this database software with ‘sudo apt update‘. You then upgrade your software when you run ‘sudo apt upgrade‘. So, in the very specific terminology used, there’s a difference between update and upgrade. I know this, but will use the words interchangeably. 

As mentioned, when you’ve started this process (that is the updating of the database) you’ll be frozen out of further apt commands that can act on the system. You can still run queries like ‘apt-cache search foo‘ but you can’t install or uninstall software while this process is happening. The same is true during the upgrade portion of the process.

Well, that’s when you’re going to get this error message.

For example, I recently had to update a Linux Mint system and the update process was horrible – but mostly because it didn’t seem designed to work with bandwidth like mine.

There were constant timeout warnings even though things were still downloading. Things would also freeze entirely and it was during this that I realized I should write an article about what to do when you get the message “Could not get lock /var/lib/apt/lists/lock”. After all, I was killing that process like an assassin in a video game. I showed no mercy!

NOTE: The correct thing to do is wait. If waiting doesn’t work and much time has passed, the next correct thing to do is reboot. After you’ve rebooted, you should try the update again and follow any directions it might give you.

YOU SHOULD NOT DO THIS!

I don’t always follow directions well. Nor do I always do the right thing. This is hardly the first time I’ve given you answers about how to do the “wrong” thing right. This probably won’t be the last time I’ve told you how to do things that are generally considered a bad idea, sometimes an especially bad idea.

With that said and done…

Fix “Could not get lock /var/lib/apt/lists/lock”:

You’re going to want an open terminal for this. Yes, a terminal. You should be used to that by now. The terminal is a handy application and we use it often. In most cases, you can just press CTRL + ALT + T and your terminal should open.

We want to get rid of the message “Could not get lock /var/lib/apt/lists/lock”. and I’ll cover a couple of quick and easy ways to do this, meaning you can (generally) start the process all over again. With your terminal, we’re going to find the PID – that is Process ID – and kill it.

You can read this article:

Find An Application’s Process ID (PID)

Or you can skip that article…

We already know that we’re interested in apt’s PID, so we just run this command:

Take the output from that and enter it in the following command:

Of course, that’s the fun way. You can actually use a much easier command to deal with the “Could not get lock /var/lib/apt/lists/lock” message. It’s not nearly as fun, but it should work every time. Try this command:

That one command should always work and is fairly easy to remember. You just take the path of the lock from the command, elevate your permissions, and remove the lock. It’s not unlike using lock cutters on a real-world lock, but requires much less physical effort!

Again, I highly suggest you resolve this message in the proper manner. Wait a while, reboot if nothing changes over time, and then try the update again so that you can follow any directions it gives you. That’s the smart way to deal with this.

Closure:

Yup… Here I am giving bad advice on the internet. I figure folks might just want to do this. If they want to do this, they might as well have good directions. This isn’t the correct way to deal with “Could not get lock /var/lib/apt/lists/lock” but it’s a way of doing so. You could end up with some currupt files and impropperly installed software, so you really should not do it this way, but it’s your computer.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Update A Single Package In Ubuntu

Today’s article should be short because it’s late in the evening and I have decided to write about how to update a single package in Ubuntu. It’s an easy topic to write about, as there are really just a couple of choices. It shouldn’t be complicated and, for the most part.

First, let me state this…

I firmly believe that you should keep everything updated and updated the minute the update is available.

HOWEVER…

That assumes a perfect world. We do not live in a perfect world. We live in the real world. Because of this, people delay updates for various reasons. The biggest delay I can think of at this hour of the night is the delays added in the business world.

Rather than push an update to production, they’ll run it through testing first. It can take quite a while before an update makes it into production.

The reality is that many of our updates are security updates. As a byproduct of their update policy, at any given time they’re running insecure software. I understand why they’d do this. They don’t want things to break. They certainly don’t want public-facing things to break.

Again, I can understand why regular people follow a similar process. They’ll wait and watch to see if the updates cause problems for other people. But, that’s like waiting for the first person to jump in the river to see if the water is cold.

In all my years of using Linux, I’ve had updates bork the system fewer times than I have fingers on one hand. I’ve had updates bork the system so completely that it hoses everything exactly zero times. As in, not once was I screwed over by an update that really did any damage.

But…

Again, I can understand those who would rather be cautious.

This article is for you. It’s for you people who want to update a single package in Ubuntu. It’s for those people who do what they must in order to maintain a stable system.

This isn’t just applicable to Ubuntu. I tend to use Lubuntu and, as such, am a fan. So, I used Ubuntu in the headline. This applies equally to Debian, Mint, and other Ubuntu derivatives. It should even work in derivatives of derivatives. It’s pretty basic stuff.

Update A Single Package In Ubuntu:

So, you might be able to do this with a GUI. I don’t actually know and I didn’t test to see if there was a way to do so graphically. Check your software manager while the rest of us open a terminal. You can (more often than not) open your default terminal by pressing CTRL + ALT + T.

With your terminal now open, you need an application to update. If you’re a good netizen, you hopefully don’t have many upgrades available. You can check and see by running this command:

You can then get a list of applications that can be updated, assuming there’s an application that can be updated, with the following command:

The next step is to use one of the following two commands to update a single package in Ubuntu (neither of which are all that difficult):

Yes, that looks like it’s going to install a new application, but you substitute the <package_name> with the package name that you want to update in Ubuntu. The ‘install’ will happily upgrade to the next passage.

The next one is bit more jargony. Jargon-y? Maybe? It’s more complicated looking (but easy enough to memorize). So, if you want to update a single package in Ubuntu, this too should also do the trick:

Once again, you replace the obvious with the obvious. Just doing so would help you sort out how to update a single package in Ubuntu. Either of these commands should work, so you do have a choice.

Closure:

As I said, it’s not going to be all that difficult to update a single package in Ubuntu. You have a choice in commands. While I think it’s best to avoid all update delays, I do understand why you might want to be more cautious.

I go full blast at updates, but I’ve lately been a bit slow about major upgrades. In my case it’s a bandwidth issue. I had one box running like Linux Mint 20 or something like that…

Wait, it still says 21 is the version – but I’m quite literally nearing the end of the upgrade process. That may have already changed. I was so far behind that I needed more than 4 GB worth of downloads. When I’m done we’ll have an OS that’s missing almost all the stuff I installed on top of it! 

It can sure be a pain in the butt. Alas, as least I’m not trying to update a single package in Ubuntu!

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

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.