Access Recovery Mode On Ubuntu

Today’s article shouldn’t be too long, but covers something important, which is how to access recovery mode on Ubuntu. If your Linux system has problems, you may need to access the recovery mode in order to fix it. This shouldn’t be a very long article, and I don’t think it’s all that complicated. Others may view this as complicated, but it seems pretty basic to me.

It isn’t all that complicated a process, but it’s something you should memorize, just in case you have no other way to access a search engine to learn this information. This is one of those skills you really ought to know by rote. It is one of those things about Linux that you probably should have memorized. 

What is Recovery Mode?

When you boot to recovery mode, you’ll be given a choice of booting to any of your currently installed kernels. The system then boots with the minimal amount of resources and mounts the root partition as read only.

You might be interested in a recent article on the subject of multiple kernels:

Show Installed Kernels In Ubuntu

Recovery mode lets you access the system to troubleshoot problems. It probably isn’t a necessary step for most issues, but it’s a necessary step that you will want to take if your desktop isn’t otherwise loading. If you’re unable to get to the GUI desktop, you should try recovery mode.

You can also try previous kernels by doing this. Recovery mode is just one option you’ll have from the GRUB menu. You get to pick your other kernels and even enter a text mode to work on your system via the CLI. For most folks that have had the kind of difficulties that stop the GUI from loading, trying recovery mode is a good step to take.

This may very well work in other operating systems. I’m being specific to Ubuntu because that’s what I have pictures for. Well, technically I’m using Lubuntu in a VM to get the pictures, but this should work for all sorts of distros. Do me a favor and leave a comment if you know this works in other distros. It’s way too late in the day and I don’t have time to check.

Access Recovery Mode On Ubuntu:

Well, you don’t need a terminal for this exercise, but you do need to reboot your computer. I suppose we can do this from a terminal, if you really want. You can just as easily use the GUI, or you can close things down gracefully and then run the following command in the terminal:

BEFORE YOU DO THAT…

We need to know if you are using EUFI/EFI boot or if you’re using the legacy BIOS mode to boot your computer. Fortunately, I’ve already covered this!

How To: Tell If You Are You Using UEFI or BIOS

Now, when your computer reboots, it’s going to perform a quick POST (Power On Self Test). That’s the point when you can decide to just let it boot or decide to enter a temporary boot menu. These shouldn’t be confused. If you’re interested in accessing your temporary boot menu, read this article:

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

As soon as POST ends and the OS starts to load, there’s a very brief window of time when you can press a key and access the GRUB menu. Trust me, this works. You may have to try multiple times before you get the hang of it, but this 100% works.

If you have a working keyboard, this works. You just need to time it right. You can try pressing and holding the right key as soon as you reboot, or you can try tapping the key over and over again. Should you have issues getting it right, check your settings for “Fast Boot” and temporarily disable that to give you more time.

If you’re using UEFI, the key you’ll press is the ESC key.
If you’re using BIOS, the key you’ll press is the SHIFT key.

Assuming you’ve done this right, you’re now at the GRUB menu…

The GRUB Menu:

GRUB stands for “Grand Unified Bootloader” and is what you’ll be seeing (and using) on a stock Ubuntu configuration. There are other bootloaders out there, but we’re assuming you’ve not changed from the default.

If you’ve done the above steps properly, you’ll see a GRUB screen. If you haven’t done this correctly, you’ll see the splash screen as the operating system starts to load. When you see the splash screen, you might as well just reboot so that you can try this all over again.

The first screen you’ll see will look like this:

the grub boot screen
I’ve highlighted the choice you want to select with your arrow keys and enter button.

As indicated, you want to select the advanced options for Ubuntu. Of course, that won’t be the case if you’re using a different distro. You’ll want to pick the advanced options for that distro.

Finally, you need to select the correct option to access the recovery mode on Ubuntu. It’s really obvious, but here’s a handy picture:

grub option to pick the recovery mode for ubuntu
You can see that you can also select the recovery mode from an older kernel.

Once you’ve done that, and with any luck, your computer will boot to the recovery mode, and you’ll have learned how to access recovery mode on Ubuntu. You can see the option to boot to an older kernel is there as well. That’s another useful tool to have in your Linux toolbox.

Closure:

Well, if everything goes perfect (and it seldom does), you won’t need to access recovery mode on Ubuntu. It’s just not something you’ll need to do. But, if things don’t go perfect – and we tend to tweak, modify, and break things as Linux users, you do have a recovery mode, and it’s not too hard to access it. Of course, what you do once you’ve entered recovery mode is up to you and will depend on your problems, but you now know how to access it.

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.

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.

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.