Today we’ll be learning a little about some apt basics. This is only useful if your distro uses apt to manage software. If you aren’t using a distro that does (Debian, Ubuntu, Mint, etc) then this probably isn’t an article that will interest you much, and that’s fine. With the great variety there is in the Linux world, it won’t always be an article that matters to you. Better luck tomorrow! Well, two days from now…
In the past we’ve covered quite a few apt commands. Here are a few that are poorly formatted ’cause, you know, WordPress…
Those are a few – but there are actually more than that. If you’re unfamiliar with apt, you can click any of those articles and learn more about it.
For those of you whose systems use apt to manage packages, this article is for you. If you aren’t aware, apt is the package manager application that you’ll interact with more often than not (if you do things in the terminal).
Apt has a number of commands, of course. As a package manager, it’s bound to be a robust and potentially complicated application. Today, we’ll just be covering a few simple apt commands that you’re most likely to use. It will not be an exhaustive article because of time constraints, reader attention limits, and usefulness. My goal was never to replicate man pages. You’ve still gotta read ’em.
So then, without further ado…
Some apt Basics:
If you want to use apt, you have to have an open terminal. If you don’t know how to open the terminal, you can do so with your keyboard. Press
With your terminal now open, you can easily install applications with apt. You’ll need to know the package name for the software you want to install, however. So, you can search for packages easily enough:
apt-cache search <keyword/type>
For example, you can use ‘terminal’ in there as a keyword and get a ton of options, all of which should be installable easily. Again, these are just apt basics.
Now that you know, or you may already have known, the package name, you can install it with:
sudo apt install <package_name>
You don’t need to do the runaround with dpkg for local .deb files, by the way. I’m not sure why people still suggest that? If there’s a good reason for doing it that way, please let me know in the comments. You can just use apt and it works just fine – including resolving dependencies (when they’re able to be resolved). To install a local .deb file with apt:
sudo apt install /path/to/<package>.deb
If you want to get the information for a specific package, you can use the ‘show’ command. That’s easy enough:
apt show <package_name>
If you want to see the dependencies, that is the other applications that need to be installed in order to make it work, then you just check the dependencies with:
apt depends <package_name>
If you want to remove a package with apt, then you can just read this article to decide which command is right for your needs:
That’ll answer it nicely enough.
There you have it. You have an article about apt basics, and that’s all it is. You’ll note that not all apt commands need elevated permissions, so there’s no need to use sudo unless you’re adding or removing software. The other commands can be run without elevated permissions.
There’s more to apt. Yes, yes there is. Type
man apt and you’ll get an idea of the available options. This article is just some apt basics, the things I think you’re most likely to need on a day to day basis.
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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.