LPIC-2 Linux Kernel and System Startup Practice Question
An administrator needs to disable IPv6 on a running system without rebooting and make the change permanent across reboots. Which set of commands should be used?
⚠ Common exam trap
Many exam-takers choose Option D (sysctl -w) alone, forgetting that the question explicitly requires the change to be permanent across reboots, which necessitates editing a persistent configuration file like /etc/sysctl.conf.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 && edit /etc/sysctl.conf to add net.ipv6.conf.all.disable_ipv6=1
It combines a runtime sysctl command to immediately disable IPv6 on the running system without a reboot, and a persistent configuration in /etc/sysctl.conf to ensure the setting survives reboots. The /proc/sys/net/ipv6/conf/all/disable_ipv6 file controls the IPv6 stack at runtime, and sysctl.conf applies the kernel parameter at boot time.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
modprobe -r ipv6
Why it's wrong here
Unloading the module may cause issues and is not reversible easily; also, it may not work if dependencies exist.
- ✓
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 && edit /etc/sysctl.conf to add net.ipv6.conf.all.disable_ipv6=1
Why this is correct
echo changes the runtime parameter; editing /etc/sysctl.conf makes it permanent. Both steps are necessary.
- ✗
Edit /boot/grub/grub.cfg to add ipv6.disable=1
Why it's wrong here
This requires a reboot to take effect; it is not a runtime change.
- ✗
sysctl -w net.ipv6.conf.all.disable_ipv6=1
Why it's wrong here
This only changes the runtime value; it does not survive a reboot.
Go deeper
Related to this question
About these practice questions
One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.