📖 Scenario: You are learning how software is installed on Linux systems using package managers. Package managers help you get software easily and safely, like a store for apps on your computer.
🎯 Goal: Understand why package managers install software and see how to check installed packages using simple commands.
📋 What You'll Learn
Create a variable to hold a list of software package names
Create a variable to hold the name of a package manager
Write a command to simulate installing software packages using the package manager
Write a command to list installed packages
💡 Why This Matters
🌍 Real World
Package managers help users install software easily and safely by handling downloads and dependencies automatically.
💼 Career
Understanding package managers is essential for system administrators and developers to manage software on Linux servers and desktops.
Progress0 / 4 steps
1
Create a list of software packages
Create a variable called software_packages and set it to a list containing these exact package names: curl, wget, and vim.
Linux CLI
Hint
Use square brackets to create a list and separate items with commas.
2
Set the package manager name
Create a variable called package_manager and set it to the string apt.
Linux CLI
Hint
Use quotes to create a string.
3
Simulate installing software packages
Write a command that uses print to show the installation command using package_manager and software_packages. The output should look like: sudo apt install curl wget vim.
Linux CLI
Hint
Use join to combine list items into a string separated by spaces.
4
Show installed packages
Write a command that uses print to show the command to list installed packages using package_manager. The output should be: apt list --installed.
Linux CLI
Hint
Use print with an f-string to show the list command.
Practice
(1/5)
1. Why do package managers install software instead of manually copying files?
easy
A. They uninstall other software before installing new ones.
B. They only download files without installing them.
C. They require manual configuration for each software.
D. They automatically handle software dependencies and versions.
Solution
Step 1: Understand the role of package managers
Package managers automate software installation by managing dependencies and versions.
Step 2: Compare manual copying with package managers
Manual copying does not handle dependencies or version conflicts, which package managers do automatically.
Final Answer:
They automatically handle software dependencies and versions. -> Option D
Quick Check:
Package managers handle dependencies and versions = D [OK]