Debian Package Management, Part 1: A User's Guide
I have not yet found another distribution that makes upgrading to a new version as easy as Debian does. As mentioned previously, when you want to upgrade your version, simply change the distribution part of the URI in /etc/apt/sources.list, then do an apt-get dist-upgrade. Often, it helps to run apt-get dist-upgrade a few times to get everything happily installed and configured. You can only use this to go to a newer version, from stable to frozen, stable to unstable or frozen to unstable. You cannot downgrade.
apt-cache is great for finding information about packages, even packages you don't have installed! The command apt-cache show <package> will print various information about the package, including dependencies, full name, what it provides, the short and long descriptions, and, most importantly, the size when unpacked. apt-cache depends <package> provides a list of what other packages the selected <package> needs installed to work properly. To print a complete list of every package available, use apt-cache pkgnames.
The most useful feature of apt-cache that I've found has to be apt-cache search <string>. This option will search through all package names and descriptions looking for occurrences of your <string> selection. Obviously, this can be a great time-saving device.
To further assist your managing capabilities, there are some options that apt-cache can utilize. For example, -i lists only the important dependencies, -f prints full records (just like “show”) after a search and -names-only limits searches to package names.
While I can usually get by with dpkg for package management, apt-cache for searching and apt-get for installation, sometimes I want to get a better idea of what's available to me. This is where dselect, console-apt and gnome-apt come in.
dselect is the granddaddy of the Debian frontends. As the first part of the installation process, it is the first thing new Debian users are greeted with, and it scares them. And it's true that dselect can be incredibly scary as well as incredibly dense. This section will be the short and sweet introduction to dselect. First, my best advice when using dselect is to read all of the on-screen help. Although not very user-friendly, everything you need to know is contained there.
When you first start dselect, you'll want to go to “[A]ccess” to select the correct access method for installation. Meaning, select “nfs” if you have a local nfs mirror of Debian, and “apt” if you want to install over the Internet (http/ftp) or if you've configured your sources.list for local addresses. Other methods available are CD, Multi-CD (if your distribution has multiple CD-ROMs as opposed to one), Floppy and Mounted.
Once you've selected your access method, dselect needs to find out what packages it has access to; to accomplish this, select “[U]pdate” and wait a minute.
“[S]elect” is where the actual package management happens. First, you'll be presented with a help screen. READ IT! When you finish READING IT, press space to get out of help or “.” to read the keybindings. You can move around the package listings by searching or by using up/down, page-up/page-down, home/end and left/right. The following are some basic, useful keystrokes in dselect:
/ search\ repeats the last search? brings up helpd scrolls down the package informationu scrolls up it
When you've highlighted a package you want to do something with, use:
+ install or upgrade- remove= leave in present state
When you're ready to leave the selection screen, select:
<enter> to confirm, quit and check dependenciesQ to quit, confirm and override dependenciesX or Esc to abandon all changes
After you press return, you may be presented with a list of packages; these may be either dependencies of or conflicts with the packages you selected. Look at the packages; the bottom half of the screen will tell you what the problem is. Once you've resolved these problems, press enter.
After you've made your changes in “[S]elect”, either “[I]nstall” or “[R]emove” which will bring your system up to date with the changes. “[C]onfig” is only necessary if any package configuration failed.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- The Qt Company's Qt Start-Up
- Devuan Beta Release
- May 2016 Issue of Linux Journal
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- The US Government and Open-Source Software
- Open-Source Project Secretly Funded by CIA
- The Death of RoboVM
- The Humble Hacker?
- BitTorrent Inc.'s Sync
- New Container Image Standard Promises More Portable Apps
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide