LPIC-1 Essential System Services and Networking Practice Question
An Ubuntu 20.04 server needs a static IP address. The administrator has created a netplan YAML file at /etc/netplan/01-netcfg.yaml. What is the next step to apply the configuration?
⚠ Common exam trap
Many candidates confuse the legacy 'systemctl restart networking' or 'ifconfig' commands with the modern netplan workflow, assuming any service restart will apply the YAML configuration, but only 'netplan apply' correctly processes the netplan files and triggers the appropriate backend.
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
✓
netplan apply
On Ubuntu 20.04, netplan is the default network configuration tool, and the correct command to apply changes from a YAML file in /etc/netplan/ is 'netplan apply'. This command parses the YAML, generates the appropriate backend configuration (systemd-networkd or NetworkManager), and applies it without requiring a reboot. It is the standard, supported method for activating static IP settings on modern Ubuntu systems.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
netplan apply
Why this is correct
Netplan reads YAML definitions under /etc/netplan and generates the backend configuration for systemd-networkd or NetworkManager. Running netplan apply commits the new static addressing immediately without a reboot, satisfying the requirement to activate the file the administrator created.
- ✗
ifconfig eth0 down; ifconfig eth0 up
Why it's wrong here
ifconfig is deprecated and does not read netplan YAML, so bouncing the interface leaves the new static address unapplied. netplan apply generates backend configuration and applies it. This sequence would be correct on older distributions where addresses were set directly with ifconfig rather than declaratively.
- ✗
service network-manager restart
Why it's wrong here
Restarting NetworkManager does not parse netplan YAML; netplan generates the backend configuration, so the YAML must be rendered first. Running netplan apply performs that generation and reloads the renderer. This command would be correct if the interface were managed directly by NetworkManager without netplan.
- ✗
systemctl restart networking
Why it's wrong here
systemctl restart networking targets the legacy SysV-style networking service, which does not read netplan YAML on Ubuntu 20.04. netplan apply parses the YAML and hands the result to systemd-networkd or NetworkManager. This command would be correct on Debian systems using /etc/network/interfaces instead of netplan.
Go deeper
Related to this question
About these practice questions
One of 402 original LPIC-1 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-1 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-1 exam.