Linux package management

Installing maintenance programs for Linux is simple with the different package management tools which are available. This month in Putting Linux to Work, two of the most common package management utilities are reviewed.

Red Hat Package Management

Red Hat Package Management, or RPM, is a simple and effective way to keep track of your software. Most commercial distributions of Linux are now RPM-compliant, however, you will still need to confirm that a particular package is compatible with your operating system. A typical RPM file looks like this:samba-2.0.7-20.i386.rpmwhere Samba is the name of the package, 2.0.7 is the version number, 20 is the release number and i386 is the platform (Intel) for which it is written. Therefore, to install the samba package, you would use the rpm command:

# rpm -i samba-2.0.7-20.i386.rpm

The -i option tells RPM to install the package. Alternatively, the upgrade (-U) option could have been used. This will either upgrade a package or install it if there was no previous version on the system. To find out which packages you have installed in your system issue:

# rpm -qa | more

Removing a package is simple with the erase (-e) option:

# rpm -e samba

Note that only the name of the package must be specified and not the actual package file. Only remove a package if you are certain you will no longer need it.

For more information about using rpm, see the manual page (man rpm). A good place to find RPM files is www.rpmfind.net which also has the required dependencies for each package, something RPM does not resolve.

Debian

Debian GNU/Linux is renowned for having very good package management tools - dpkg and apt-get. The command line package management tool dpkg is used in a similar manner to rpm. To install a package in Debian using dpkg, you would issue the command:

# dpkg --install samba_2.0.7-3.deb

which will install Samba. Notice the .deb extension on the package file name, signifying that it is a Debian package. To remove the Samba package, you would use the remove option:

# dpkg --remove samba

and as with RPM, the package name is specified and not the package file. The other package management tool for Debian is apt-get. This program will refer to a list of sources where you can obtain packages. Sources can be mounted file systems, such as a CD-ROM, or even an ftp server. The tool itself is simple to use. For example:

# apt-get update

will update information about packages which are available;

# apt-get install samba

will install Samba; and

# apt-get upgrade

will upgrade all the packages that are installed on the system. Generally, a sound understanding of package management will make installing and upgrading programs for Linux easy.

GRAPHICAL UTILITIES

In addition to using the command line to maintain packages, a number of graphical programs can be used to simplify the process.

Gnome RPM

Gnome RPM is a graphical front-end to Red Hat Package Management included with the GNOME desktop environment. Gnome RPM is started by issuing the command:

# gnorpm

in a terminal emulator while running X Windows. The Gnome RPM interface is similar to a graphical file manager where all your installed packages are listed under their respective categories, such as User Interface and Amusements. The only difference between using gnorpm and the command line is that there are large buttons to point and click that do the tasks of installing, uninstalling, querying and verifying packages. A few handy features built into Gnome RPM are a utility to search through packages on your system and a Web find utility that uses rpmfind to locate and download packages.

kpackage

The kpackage application is standard as part of the K Desktop Environment (KDE) and functions in a similar manner to Gnome RPM. Upon starting kpackage, which is done by issuing:

# kpackage

in a terminal emulator, your RPM database is queried and the installed packages are listed in their relevant categories. When you select a package, its details - such as version number and size - are shown. A useful feature of kpackage is that it will handle various types of packages such as deb, Slackware and BSD.

Using the various package management utilities available for Linux will make application administration much easier.

Join the PC World newsletter!

Error: Please check your email address.

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Rodney Gedda

PC World
Show Comments

Essentials

Microsoft L5V-00027 Sculpt Ergonomic Keyboard Desktop

Learn more >

Lexar® JumpDrive® S57 USB 3.0 flash drive

Learn more >

Mobile

Lexar® JumpDrive® S45 USB 3.0 flash drive 

Learn more >

Exec

HD Pan/Tilt Wi-Fi Camera with Night Vision NC450

Learn more >

Lexar® Professional 1800x microSDHC™/microSDXC™ UHS-II cards 

Learn more >

Lexar® JumpDrive® C20c USB Type-C flash drive 

Learn more >

Audio-Technica ATH-ANC70 Noise Cancelling Headphones

Learn more >

Budget

Back To Business Guide

Click for more ›

Most Popular Reviews

Latest News Articles

Resources

PCW Evaluation Team

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre x360

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga 910

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?