These exercises give you practice performing:
- Package management with the RPM Package Manager (RPM)
- Software management with Yellowdog Updated Modified (YUM)
To get the most from exercises in this series, you should have a basic knowledge of Linux and a working RPM-based Linux system on which you can practice the exercises covered in this article.
Exercise 1. Install an RPM package
Although more advanced software management tools such as YUM have gained
wide acceptance, the rpm command still has its
place in many systems administrator scenarios. Likewise, many third-party
commercial Linux-based applications can be downloaded as RPM files.
Assume that you are working for an organization that just acquired another
company. You have been tasked with changing thousands of lines among
multiple Extensible Markup Language (XML) files from the previous
company's name to the new name. The rpl command
can do just that:
- Find and download the latest stable RPM package for
rpl.
This exercise doesn't focus on YUM, but as an alternative to downloading
the rpl rpm file from a reputable mirror site,
you could use the yumdownloader command if
rpl is available in one of your computer's
enabled YUM repositories. The command
yumdownloader rpl will download the file.
Once the RPM file is downloaded:
- Use the
rpmcommand to install the package with flags for verbose output and hashes (#) to show progress.
The rpm --help command will assist you with the
correct syntax for these flags.
Exercise 2. Use RPM to query for information
Use the rpm command to:
- Verify that the package is installed on your computer
- Find all files associated with the package
- Determine which package owns the /bin/ls file
Exercise 3. Use RPM to remove a package
You have completed the task to replace the company name in thousands of
places among multiple files in record time using the
rpl tool. However, you don't anticipate using
rpl in the near future, so you decide to
uninstall the program to save disk space (actually,
rpl is a tiny program) and minimize the number
of installed software programs on your computer.
- Use the
rpmcommand to remove therplprogram from your Linux computer.
Exercise 4. Use YUM to find information about software
This exercise covers the use of YUM to automatically discover and install dependencies, find information about available software from enabled YUM repositories on your computer, and install and remove software.
Perhaps you are performing a job requiring a lot of command-line processing with arguments and would like to set a few aliases. The tcsh (pronounced tee-see-shell) can do exactly that. Tcsh is a widely available shell that most likely is not installed on your computer but is available from your YUM repository.
- Use the
yumcommand to perform these tasks:- Determine whether tcsh is available within an enabled YUM repository on your computer
- Find information about tcsh
- Determine the dependencies, if any, that tcsh will require
Exercise 5. Use YUM to install software
Now you are ready to install the new software.
- Use the
yumcommand to perform these tasks:- Install tcsh
- Verify that tcsh is installed on your computer
Exercise 6. Use YUM to remove software
As in exercise 3, remove the software to manage disk space and prevent the need for any future updates to tcsh:
- Use the
yumcommand to remove tcsh.
Follow these solution steps to check your work.
- The developerWorks article Learn Linux,101: RPM and YUM package management (developerWorks,
May 2010) describes the commands required to complete these exercises.
- At the LPIC
Program site, find detailed objectives, task lists, and sample
questions for the three levels of the LPI's Linux systems administration
certification. In particular, look at the LPI-101 detailed objectives and the sample questions.
- Review the entire LPI exam
prep series on developerWorks to learn Linux fundamentals and
prepare for systems administrator certification based on LPI exam
objectives prior to April 2009.
-
Exam Preparation Resources for Revised LPIC Exams provides a list
of other certification training resources that LPI maintains.

Tracy Bost is a seasoned software developer and systems engineer. He is also a lecturer and trainer for the Linux operating system. Tracy has been certified as both a Red Hat Certified Engineer (RHCE) and a Microsoft Certified Systems Engineer (MCSE), along with being an active member of the Linux Foundation. He has worked in several industries, including mortgage, real estate, and the nonprofit sector.




