LFCS Networking Practice Question
After editing /etc/resolv.conf to set a custom DNS server, the changes are reverted after reboot. What is the most likely cause?
⚠ Common exam trap
Watch out — candidates often assume DHCP client behavior (Option A) is the primary cause, but the LFCS exam focuses on NetworkManager as the default network service manager on modern enterprise Linux distributions like RHEL and CentOS.
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
✓
NetworkManager manages DNS and overwrites manual changes
NetworkManager actively manages network interfaces and DNS settings by default on many Linux distributions. When a user manually edits /etc/resolv.conf, NetworkManager detects the change and overwrites it with its own configuration, especially after a reboot or network restart, because it treats the file as a managed resource. This is the most common reason for DNS changes being reverted.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The DHCP client overwrites resolv.conf on lease renewal
Why it's wrong here
Only if the interface is DHCP-enabled; static editing may still be overwritten by NetworkManager.
- ✗
SELinux reinitializes the file from defaults
Why it's wrong here
SELinux does not alter resolv.conf.
- ✓
NetworkManager manages DNS and overwrites manual changes
Why this is correct
NetworkManager updates resolv.conf based on its configuration; to persist manual changes, set dns=none in NetworkManager.conf.
- ✗
systemd-resolved regenerates the file from configuration
Why it's wrong here
systemd-resolved is not the default in RHEL/CentOS 7.
Visual reference
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.