Installing Applications With DPKG

If you are installing software via the terminal, you may want to learn more about installing applications with dpkg. It’s a simple process and I’ll also cover how to uninstall software with dpkg. It seems like the thing to do and it seems like a handy article to write, especially for new users.

You should probably know that apt is a frontend for dpkg and I’d suggest using apt to install software. That article does mention dpkg, but this article will be exclusively about installing (and removing) applications with dpkg.

The main reason I’d suggest using apt instead of dpkg is because apt will manage dependencies automatically. That’s a pretty handy feature. Still, you might as well learn to install applications with dpkg. You might as well also learn about uninstalling applications with dpkg.

This article only applies to distros that support dpkg as their package manager. That’d be distros like Debian, Ubuntu, Mint, and the many other Debian derivatives.

What is DPKG:

You won’t have to install anything. If your distro supports dpkg, it will be installed automatically. You can verify that dpkg is installed with the following command:

The reason for this being a Debian (and derivative) thing is obvious when you check the man page. If you do that, you’ll learn that dpkg is:

dpkg – package manager for Debian

Installing software is definitely managing packages. That means this is one of the correct tools for the job. There are graphical ways to do this and you can easily install software with gdebi.

Anyhow, you can even visit the dpkg homepage. That’s the tool we’ll be using to install software.

Installing Applications With DPKG:

This is one of those articles that requires an open terminal. That’s a fairly common thing around here and most of you know that you can open your default terminal simply by pressing CTRL + ALT + T.

With your terminal open, let’s all start on the same page…

In our example, we’ll use XnView MP. You can download that with this command:

If you’re using a 32-bit distro, there’s no current XnView MP available. They’ve stopped development, but you can download an older version.

Now that you have XnView MP downloaded, you can install applications with dpkg with the following syntax:

Or, in our case, we’d install XnView MP with this command:

(Don’t forget that you can use autocomplete.)

See? It’s fairly easy to install applications with dpkg. I picked this XnView Multiplatform because it doesn’t have any dependencies in my testing. That keeps it relatively simple.

If there were dependencies, you could install them manually with dpkg. You can do that, or you can just use apt (which, again, you probably should have used in the first place). To do that, it’s simple:

If you’re going to have to run an apt command after installing applications with dpkg, you might as well use apt in the first place. When you install packages with apt it will also resolve any dependencies (if those dependencies can be satisfied).

Removing Software with DPKG:

Yes, you will still need an open terminal if you want to remove software with dpkg. It only stands to reason. So, if you’re here for just this section of the article, open your terminal. There are directions above if you’re new to Linux.

The syntax to remove software with dpkg is also quite simple.

NOTE: The package name is going to have a different name than the installation package, lacking at least the .deb portion. You can find the name with this command:

So, in our example, we’d try a command like this:

Sure enough, it returns this:

So, we can see the application name is not the same as the package name. In this case, the name is ‘xnview’. That means we’d use this to remove the package:

That removes the application but it retains the configuration files. This means you can install the application at a later date and still have the same configuration you had before you removed the application.

See also: ‘sudo apt remove’ vs ‘sudo apt purge’

If you want to uninstall the application and remove the configuration files, you can just use the -P (purge) flag. The syntax follows:

If we use this command with our example application, it’s like this:

Now, if you want to pretend this article never happened, we can clean up after ourselves with the following command:

That will delete the .deb file, meaning we’ve left no evidence behind (assuming you purged the application). Of course, you no longer have that particular graphics viewing, organizing, and light editing application installed. That’s entirely up to you.

Closure:

Well, if you ever needed to know about installing applications with dpkg, this was the article for you. We even discussed the process of removing the application and cleaning up after yourself. Good times!

If we wanted to be ‘more correct’, we’d say that we started with a package and installed an application. I figured I’d aim at the more generic words in hopes that newer users find this information and find it relatable.

There’s a limit to what you can ‘optimize’ for (meaning ranking in search engines) so I do what I must. I work on SEO (search engine optimization) because the site’s pointless if it doesn’t help anyone.

The whole goal is to get my notes (and more) online so that the site becomes a resource. More specifically, the end goal is to make Linux more approachable. Now if I could just make the site break even…

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.

Monitor Your Linux System With NMON

There are times when you want to see what’s going on with your devices and you can monitor your Linux system with nmon. If you’ve never heard of nmon, that’s okay. You’ll find that nmon is a handy application that lets you monitor all sorts of aspects of your system. You’ll also find that nmon is an application that’s used in the terminal, so be prepared for that.

This nmon application is available for most Linux systems and I’ll let you know how to install nmon in this article. You’ll find that nmon stands for ‘Nigel’s Monitor’ and has been around since the early IBM AIX days. It has since been made available for Linux.

You can read about nmon on Wikipedia.
You can also visit the nmon project page.

If you check the man page, you’ll see nmon described as:

nmon – systems administrator, tuner, benchmark tool.

We won’t be doing much of that. We’ll just be using nmon to monitor the system. You can then take that information and use it to administrate, tune, and benchmark the system. We’ll be using nmon to monitor CPU, RAM, your network usage, and things of that nature.

You can also learn more about nmon from the man page because I’ll only be covering how to monitor your Linux system with nmon. There’s almost always so much more! It’s almost a shame that I try to limit many of my articles.

Installing nmon:

You can use your usual GUI tools to find and install nmon. It’ll be available for most distros. It’s also possible to install nmon in the terminal. We’ll cover that, so just press CTRL + ALT + T to open up your terminal.

With your terminal now open, we’re ready to install nmon.

Debian/Ubuntu/etc:

Arch/Mandrake:

RHEL/CentOS:

SUSE/OpenSUSE:

Gentoo:

I think that covers the vast majority of distros out there. If you don’t see your distro, or if I got one wrong, please let me know in the comments. I don’t always get this section right. I wasn’t even planning on writing this article today. But… Here we are!

Monitor Your Linux System With NMON:

You should have a terminal open already, from when you were installing nmon. This is going to sound strange, but you’re new to nmon – or you probably wouldn’t be reading this article. Because you’re new, open up a second terminal.

In the first terminal, enter this:

In the second terminal, enter this:

Now, do you see why I had you open two terminals?

In the first terminal, look at your settings and options. In your second terminal, apply them. See, once you apply them you can no longer trivially refer to the material in the first terminal.

You can apply the monitoring options in any order you’d like and in any combination that you like. The nmon application makes it easy. You press c to monitor the CPU, m to monitor memory, n to monitor the network, and things like that.

So, pick what you want to monitor from the first terminal and press the appropriate key in the second terminal. It might look a bit like this:

nmon monitoring options
There are quite a few options to pick from and it’s straightforward.

Then, your monitoring terminal could look a bit like this:

monitoring system processes with nmon
See? That’s monitoring CPU, memory, the network, and top processes – all in one screen.

Of course, once you know how nmon works and what you’d like to monitor in your Linux system, you won’t need to have the first terminal open. There are a lot of options, but you’ll find they’re easy to remember. You can also use ? instead of a separate terminal window. I find the two-terminal method to be easier for me because I don’t run nmon often enough to recollect the myriad options.

I suppose you want to know how to get out of nmon without closing the terminal window and leaving nmon running in the background. Well, that’s easy. Just press CTRL + C to quit nmon and return to your regular terminal prompt.

Closure: 

I didn’t plan on writing this article today, but I’d cracked open nmon for one reason or another and decided that I’d write about nmon when I was thinking about it. It’s another one of those articles that scratches my own itch, but it’s also something worth sharing.

It’s a pretty easy task to monitor your Linux system with nmon. I figure anyone can do it and I tried to make it easier for new nmon users by suggesting they use two distinct terminal windows. It seems like a reasonable way to get started.

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.

Restoring Google Search To Chromium When Installed In Linux Mint

Well, that’s a long headline, but it’s not easy to compress the idea of restoring Google Search to Chromium when installed in Linux Mint! However, this is another article that is just me scratching my own itch. You’ll understand what I mean soon enough, I hope. I mean, I think I can describe it well enough.

Also, I’m using a new keyboard. I wore the last one out. That always slows me down for a little while. Ah well… I digress, and needlessly so…

So, let’s say you’ve done a fresh install of Linux Mint. Let’s also say that you decided you want to use Chromium. Fortunately, Chromium is in the default Linux Mint repositories. Given the ease of this operation, you go ahead and install Chromium in Linux Mint with the following command:

Everything appears well and good – until such a time as you decide you want to search from the search bar. At that point, you’ll notice that Chromium in Linux Mint uses a different search engine. This should be easy to change (and it is) but when you look in the settings you’ll see that Google Search is nowhere to be found.

There’s a resolution for this! We won’t even need the terminal.

I’ll presuppose that you’ve already installed Chromium, so we’ll skip that part. You can figure that out if you haven’t already figured that out and are now curious about adding Google Search.

Restoring Google Search To Chromium:

First, you will want to open Chromium, click the three vertical dots in the upper right, and select ‘Settings’.

From there, you look to the left to find the ‘Search engine’ option and click on that. Chances are good that you already tried this, assuming you’ve wanted to restore Google Search to Chromium.

You next click on ‘Manage search engines and site search’, which is where we want to be to edit search engines in Chromium.

Scroll down to ‘Site Search’ and click on ‘Add’, like so:

adding google search to chromium in linux mint
See? It’s a pretty basic concept. The rest is also easy. We can restore Google Search!

That’s going to pop up a new window that looks like this:

adding a new search engine in chromium
There aren’t many fields to be filled out – and Google isn’t your only option.

Under ‘Search engine’, add: Google 
Under ‘Shortcut’, add: google 
Under ‘URL’ add: https://www.google.com/search?q=%s 

Note, that the %s is where your search terms would go in the website’s URL. If you wanted to add Ecosia, for example, you’d use this in the last section:

Be sure to click the ‘Add’ button when you’re done.

By the way, the ‘Shortcut’ is the text you’d type to manually pick that search engine. You start your address bar query with the shortcut text, add a space, and then add your search terms. That will let you pick among the various search engines manually. In the above example, you’d first type ‘google’ and that’d give you results from Google Search.

Of course, you can just make Google Search the default…

Make The New Search The Default Search:

If you want, you can make the newly added search engine the default search engine. That’s what I did, but it’s entirely up to you. You could always just preface the search with the word/letter you put in the 2nd second and manually select your search engine.

To make the newly added search the default search, simply click the three verticle dots next to the new entry and set it as the default. Like so:

Make the newly added search engine the default search engine.
  Tada! It’s default!

That’s all there is to it. You’ve now made the newly added search the default search. When you search from the address bar, it will use your default search engine. If you highlight and right-click to search, it will now use your new default search engine.

Notes:

I mentioned Ecosia and gave an example. It’s pretty easy to find the right URL. Go to the search engine (or site search engine) and enter ‘example’ into the search bar.

If you did that here on Linux-Tips, you’d get this:

To add this site as a search engine, you’d replace ‘example’ with %s. Like so:

If you wanted to add Bing, you’d do the same thing:

Verify that you can remove the gibberish:

(And you can…)

So, the result needed to add Bing as a search engine would be:

 You can generally do this with any sites you want – so long as they’re reasonably accessed and have the search term included in the address bar. If you wanted to search Linux.org from the search bar, you’d use:

Yes, that will work and it will still properly filter the results according to date. It’s pretty easy. As I mentioned, I’m mostly scratching my own itch with this article. This was a change I needed to make and I thought it’d make a good article. I’ve decided to make it more thorough, showing you that you can do more than just restore Google Search to Chromium.

This will also work with browsers based on Chromium. If you are using Brave, Vivaldi, Edge, Chrome, etc., then you can almost certainly manage your search engines just like this. I tend to have a few search engines configured but I mostly rely on Google Search as it seems to consistently work best for me. You do you, however.

Closure:

Well, there you go. It’s pretty easy to learn about restoring Google Search to Chromium when installed in Linux Mint! (That’s such a long headline…) The concept is easier than trying to make a concise headline out of it. I dare say this is the longest headline I’ve ever had. Search engines are not going to like it. Hopefully, the content makes up for that!

If you’re still reading this far, you might as well know that Google uses a different address in their search settings. It’s a convoluted thing and I hope I get this right…

However, you don’t need all that. You’re fine (as far as I can tell) with the basic option I gave above. But, I figured I’d include this just for the sake of completeness. Good luck restoring Google Search in Chromium when installed in Linux Mint! It’s not that challenging and I’m sure you can figure it out.

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.

Repair Your Filesystem With FSCK

Over the years, we’ve covered the fsck command fairly extensively but I’ve never really written an article about how you repair your filesystem with fsck. This may very well be the last time we have an fsck article on this site. It seems like I’ve covered everything you need to know.

This article is about using fsck when you’re booted into your operating system. You can’t run fsck against a mounted drive. So, if you want to check and repair your root filesystem, the following article may be of assistance:

Repair Your Linux Filesystem With a Live USB or DVD

That’s a fairly popular article, as it ranks well in search engines. I’ve also recently authored this article:

Enable fsck On System Start

This article will be fairly simple and reasonably short. We’ll see if that turns out to be true, ’cause I wrote this before I finished the article! We shall see!

The Tools:

You’ll only need a couple of tools to repair your filesystem with fsck. First and foremost, you’ll need a terminal. I’ll assume you have a terminal. All the tools in this article will require an open terminal. You can usually press CTRL + ALT + T to open your default terminal.

You will also need…

lsblk:

The lsblk application is the first tool we’ll be using. Using lsblk is how we’ll identify your partitions. You almost certainly won’t need to install anything as this is one of those tools installed by default. You can verify that lsblk is installed by running:

If you check the man page, you’ll see that this is indeed the tool for the job.

lsblk – list block devices

See? We want to list block devices – that will show us the partitions and various filesystems.

umount:

The next tool we’ll use is the umount command. You can’t run fsck against a mounted filesystem, so we’ll need first to unmount the devices before we can repair them with fsck. You can verify that umount is installed with this command:

Again, we’ll check the man page to ensure that this is the correct tool for the job.

umount – unmount filesystems

See? I wouldn’t steer you wrong. This is the tool we need to unmount filesystems before we use fsck, the next tool, to repair filesystem errors.

fsck:

This is the tool we’ll be using. We’re going to repair your filesystem with fsck, assuming your filesystem needs to be repaired. This must be a Linux filesystem, meaning Ext2, Ext3, Ext4, etc… You’ll need other tools for filesystems otherwise formatted. Once again, you can verify that fsck is installed with the following command:

Again, if we check the man page, you’ll see that this is the right tool for the job.

fsck – check and repair a Linux filesystem

I’d say that these are the best tools we can use for today’s task.

Repair Your Filesystem With FSCK:

I gave instructions above that told you how you can usually open your terminal. That keyboard combination is not true with every distro and I don’t know why. It seems to me that it should be a standard. If you’re using such a distro, you can open your terminal from the application menu.

With your terminal open, we first need to identify your filesystems. You can do that with the following command:

You’ll get an output similar to this one:

You can also run:

That has the added benefit of showing limited information and which filesystems are identified as Linux filesystems. I use lsblk above because I use that often and want a consistent set of directions across the site. However, an example output from the above command would contain information like this:

You can run that command if you prefer. You may have to scroll up to see all of the information. In the output I shared above, you’ll notice that it didn’t include any information about /dev/sda* filesystems. As those are mounted and need to be mounted (in my case) it doesn’t matter.

At this point, you need to identify the filesystem you want to check. If you use the first command, you’ll need to remember to add /dev to the front. So, it’s not sdb2, it’s /dev/sdb2. If you use the second command, it gives you that information.

Now, we’re just going to automatically check for problems and repair them with fsck, but first you need to unmount the filesystem. To do that, you just run the following command:

Then, you can just run fsck against the filesystem’s device ID, like so:

For example, I could run:

With the -p flag enabled, it will automatically check the filesystem for errors and repair them – unless they’re really serious. If they’re serious errors, it will ask you what to do.

NOTES:

Unfortunately, I don’t have any filesystems that need to be repaired. Linux is rather robust and our filesystems are usually fairly healthy. If you suffer from random reboots without properly shutting down, you might have a different experience.

When you’re done with this, you can remount the filesystems you checked for errors. Frankly, that’s a whole other article. If you open your file manager, the GUI one, you can often mount filesystems right from there. You can also unmount them, but we did that right there in the terminal.

Again, you can’t unmount your root partition or any other important partitions. If you use separate partitions like /home or /dev, you’ll need to use a live USB to repair those mounted filesystems. This command will only work with Linux filesystems. It is not going to work with FAT, EXFAT, NTFS, etc., it will only work with Linux filesystems.

That might be a good reason to run the 2nd command ( sudo fsck -l) where you’ll get an output like this:

Look at /dev/sda1, where it properly identifies the type as an “EFI System”. That means that it’s not a supported filesystem and fsck will do you no good when you target it. I figure you’re smart enough to know the differences and what you have used, so lsblk is easier – and more consistent as we use that command frequently here on Linux-Tips.us.

Closure:

Well, it turns out that I was mistaken. I thought this was going to be a quick and easy article. I think it’s easy enough, but it wasn’t very quick. It has been a mixed bag lately as I play around with the formatting of various articles. This often makes them longer, but I’m okay with that. Plus, I type quickly!

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.

Unzip .gz Files With gunzip

You can just as easily do this in a GUI, but we’ll be using the Linux terminal to unzip .gz files with gunzip. Why? Because we can! You never know when you’ll be limited to a terminal and need to extract the files found in a .gz file.

If you do some searching around the web, you’ll see that .gz files are made with gzip. If you do some more digging, you’ll learn that gzip is both a file type and the name of the application. The .gz files are referred to as gzip files.

While you may encounter just plain .gz files, you’ll often find them as ‘tar.gz’ files, meaning they’ve been prepared for tape archives. You can read about that here:

Let’s Decompress A File (tar.gz) In The Terminal

You won’t need to install anything for this article. The tools will be installed on any major distro – and even on most minor distros. Gzip has been around for more than 30 years, at the time of this writing, and is widely used – even though there are many other compression tools out there. The .gz format is not patent encumbered, nor is it proprietary.

We’ll be using gunzip to unzip .gz files. If you check the man page, you’ll see:

gzip, gunzip, zcat – compress or expand files

As you can see, that means it is the right tool for the job. You can just as easily use ‘file-roller’ in your GUI to unzip .gz files. You have choices!

It’s currently a Sunday evening and my last few articles have been quite long. I think we’ll keep this one short. I might as well…

Unzip .gz Files With gunzip:

As I mentioned earlier, you can do this with a GUI application. We’ll be unzipping .gz files in the terminal. Just press CTRL + ALT + T to get your terminal open and we can begin.

The first thing you need is a .gz file.

Download example.gz here: Link

With that freshly downloaded, you can use cd to get to your ~/Downloads directory (or whichever directory you used):

Now, you can simply extract the contents, like so:

If you want to extract multiple .gz files at one time, try this:

If you want to extract all the .gz files in a folder, try this command:

There you have it. That’s all you need to know if you want to unzip .gz files with gunzip. It’s not even a little complicated. Anyone can figure this one out.

Closure:

I wasn’t kidding when I said I’d keep this one short. There’s no reason to make it all that long and it’s a weekend. It’s also a holiday weekend and you got a lovely article on Saturday. This one is just a simple task, for those who might want to unzip ..gz files with gunzip – in the Linux terminal. It’s pretty easy!

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.