0
0
Linux CLIscripting~20 mins

yum/dnf (RHEL/CentOS) basics in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Yum/DNF Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
What is the output of this command?
You run the command yum list installed httpd on a RHEL system. What will this command output?
Linux CLI
yum list installed httpd
ALists the installed version of the httpd package if installed, or shows 'Error: No matching Packages to list'
BInstalls the httpd package
CRemoves the httpd package
DUpdates the httpd package to the latest version
Attempts:
2 left
💡 Hint
Think about what 'list installed' means in yum.
💻 Command Output
intermediate
1:30remaining
What happens when you run this command?
What is the result of running dnf clean all on a CentOS system?
Linux CLI
dnf clean all
AInstalls all available updates
BRemoves all installed packages
CRemoves all cached package data and metadata, freeing disk space
DLists all enabled repositories
Attempts:
2 left
💡 Hint
Think about what 'clean' means in package managers.
📝 Syntax
advanced
2:00remaining
Which command correctly installs a package and its dependencies?
You want to install the package 'vim' along with all its dependencies on a RHEL system. Which command is correct?
Adnf update vim
Byum get vim
Cdnf remove vim
Dyum install vim
Attempts:
2 left
💡 Hint
The command should add a package, not remove or update it.
🚀 Application
advanced
2:00remaining
How to check which repository provides a package?
You want to find out which enabled repository provides the package 'curl' on a CentOS system. Which command will show this information?
Ayum list installed curl
Bdnf repoquery --whatprovides curl
Cdnf clean all
Dyum remove curl
Attempts:
2 left
💡 Hint
Look for a command that queries repositories for package info.
🔧 Debug
expert
2:30remaining
Why does this command fail with 'No match for argument' error?
You run yum install httpd-tools-2.4.6 but get the error 'No match for argument: httpd-tools-2.4.6'. What is the most likely reason?
Linux CLI
yum install httpd-tools-2.4.6
AThe package name should not include the version number; use 'yum install httpd-tools' instead
BThe package is already installed, so yum refuses to install it again
CThe system is offline and cannot reach repositories
DThe command syntax is incorrect; 'yum install -v httpd-tools-2.4.6' is required
Attempts:
2 left
💡 Hint
Think about how yum expects package names.