A storage vendor certifies only the kernel that ships with your Red Hat Enterprise Linux 9 server. You must permanently prevent any future dnf operation from installing or upgrading packages whose names start with kernel, without relying on additional plug-ins or extra command-line options. Which change will accomplish this goal?
Run dnf versionlock add kernel* to lock the package and enable the versionlock plug-in.
Set enabled=0 for the [baseos] repository in /etc/yum.repos.d/redhat.repo.
Create /etc/apt/preferences.d/kernel containing:
Package: kernel
Pin: release a=*
Pin-Priority: -1
Add the line excludepkgs=kernel* to the [main] section of /etc/dnf/dnf.conf.
The excludepkgs option in /etc/dnf/dnf.conf accepts a comma-separated list or glob patterns that are omitted from all future dnf transactions. Adding excludepkgs=kernel* in the global [main] section ensures every invocation of dnf skips any package whose name begins with kernel, achieving a system-wide, persistent exclusion.
dnf versionlock requires the extra versionlock plug-in and usually locks specific NEVRA strings; wildcard locks do not stop new kernel builds from appearing. APT pinning (the preferences file) applies only to Debian-based systems, not RHEL. Disabling a repository with enabled=0 stops all packages in that repo, not just kernels, and still allows other enabled repositories to supply newer kernel packages.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the `[main]` section in `/etc/dnf/dnf.conf`?
Open an interactive chat with Bash
Why is `dnf versionlock` not appropriate in this scenario?
Open an interactive chat with Bash
What is the difference between `dnf` and `apt` in this context?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access