BCE-O535 Linux and Shell Programming

0 of 30 lessons complete (0%)

Module 4 Software Management

Example 1: Package Tree

Example Scenario: Managing the tree Package

  1. Installing the Package:

bashCopy code

# Install the 'tree' package 
sudo yum install tree
  1. Updating the Package (if available):
# Update the 'tree' package 
sudo yum update tree
  • Note: If there is no update available for the tree package, the system will indicate that it’s already up-to-date.
  1. Removing the Package:
# Remove the 'tree' package sudo yum remove tree
  1. Troubleshooting Installation:
    • Scenario: In this scenario, we’ll simulate a problem during installation. Let’s say the package repository is temporarily unavailable.
# Temporarily disable the repository to simulate an error during installation 
sudo yum-config-manager --disable base 
# Now try to install the 'tree' package (which will fail due to the disabled repository) 
sudo yum install tree
  • After attempting to install the package, students will receive an error message indicating that the repository is not available. They should then re-enable the repository and try the installation again.
# Re-enable the repository 
sudo yum-config-manager --enable base 
# Retry the installation 
sudo yum install tree
  • The installation should now succeed.


  • This example provides hands-on experience with the package management process, including installation, updating, and removal.
  • The troubleshooting scenario simulates a real-world situation where a repository might be temporarily unavailable. Students will learn how to identify and resolve such issues.

Remember to encourage students to run these commands in a controlled lab environment to gain practical experience.