0
0
Linux CLIscripting~20 mins

Installing, updating, removing packages in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Package Manager Pro
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
What is the output of updating package lists with apt?
You run the command sudo apt update on a Debian-based system. What is the expected output shown?
Linux CLI
sudo apt update
ADisplays the current kernel version
BInstalls all available package updates automatically
CRemoves unused packages from the system
DLists package sources and shows 'Reading package lists... Done' with no errors
Attempts:
2 left
💡 Hint
Think about what 'apt update' does before installing or upgrading.
💻 Command Output
intermediate
1:30remaining
What happens when you run 'yum remove' on a package?
On a Red Hat-based system, you run sudo yum remove httpd. What is the expected result?
Linux CLI
sudo yum remove httpd
ALists all installed packages including httpd
BUpdates the httpd package to the latest version
CUninstalls the httpd package and its dependencies no longer needed
DInstalls the httpd package if missing
Attempts:
2 left
💡 Hint
Removing a package deletes it from the system.
📝 Syntax
advanced
1:30remaining
Which command correctly installs a package with dnf?
Choose the correct command to install the package 'nano' using dnf on Fedora.
Asudo dnf install nano
Bsudo dnf get nano
Csudo dnf update nano
Dsudo dnf remove nano
Attempts:
2 left
💡 Hint
The command to add a package is 'install'.
💻 Command Output
advanced
1:30remaining
What message is shown when removing a non-existent package with apt?
You run sudo apt remove nonexistent-package. What is the expected output?
Linux CLI
sudo apt remove nonexistent-package
APackage 'nonexistent-package' is not installed, so not removed
BPackage nonexistent-package removed successfully
CReading package lists... Done
DAll packages are up to date
Attempts:
2 left
💡 Hint
apt remove checks if the package is installed on the system.
🚀 Application
expert
2:00remaining
How many packages are upgraded after running 'sudo apt upgrade'?
After running sudo apt update and then sudo apt upgrade, the output shows 5 packages will be upgraded. What is the number of packages actually upgraded after the upgrade completes successfully?
Linux CLI
sudo apt update && sudo apt upgrade -y
A0
B5
CDepends on user confirmation
DAll installed packages
Attempts:
2 left
💡 Hint
The upgrade command installs all listed upgrades unless interrupted.