You need to permanently disable IPv6 on a BIOS-based RHEL server that uses GRUB 2. The change must survive future kernel updates and must follow the vendor-recommended workflow for modifying the boot loader configuration. Which action will achieve this goal?
Create a custom menuentry with "ipv6.disable=1" inside /etc/grub.d/40_custom and run "grubby --update-kernel=ALL".
Add "ipv6.disable=1" to the DEFAULTKERNEL variable in /etc/sysconfig/kernel and run "dracut -f" to rebuild the initramfs.
Add "ipv6.disable=1" to the GRUB_CMDLINE_LINUX line in /etc/default/grub and run "grub2-mkconfig -o /boot/grub2/grub.cfg".
Append "ipv6.disable=1" directly to the linux line in /boot/grub2/grub.cfg and save the file.
GRUB 2 regenerates its binary menu (/boot/grub2/grub.cfg) from templates in /etc/grub.d and the settings found in /etc/default/grub. Red Hat documentation states that you should edit /etc/default/grub (for example, by adding ipv6.disable=1 to the GRUB_CMDLINE_LINUX line) and then rebuild the menu with grub2-mkconfig -o /boot/grub2/grub.cfg. Editing grub.cfg directly is discouraged because the file is overwritten whenever grub2-mkconfig or update-grub is run. Placing the parameter in /etc/grub.d/40_custom or in /etc/sysconfig/kernel does not automatically propagate the option to every new kernel and therefore is not the preferred, maintainable approach.
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 GRUB 2 and how does it function in Linux?
Open an interactive chat with Bash
Why is editing `/boot/grub2/grub.cfg` directly discouraged?
Open an interactive chat with Bash
What does the kernel parameter `ipv6.disable=1` do?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access