LFCS Networking Practice Question
An administrator needs to temporarily assign the IPv4 address 172.16.5.20/24 to interface ens3, which is currently up but unconfigured. The change should not persist across reboots. Which command accomplishes this?
⚠ Common exam trap
The trap here is reaching for nmcli or ifconfig out of habit, when the requirement is a temporary change and the supported modern tool is ip.
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
✓
ip addr add 172.16.5.20/24 dev ens3
Runtime address assignment on Linux is performed with the iproute2 ip addr add command, which targets a named interface and does not alter persistent configuration. NetworkManager's nmcli modifies stored profiles and persists changes, while ifconfig is legacy. The ip command is the current, supported tool for non-persistent interface changes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
nmcli con mod ens3 ipv4.addresses 172.16.5.20/24
Why it's wrong here
The nmcli con mod command modifies the persistent connection profile stored by NetworkManager. The change would survive reboots, which contradicts the requirement for a temporary assignment. Additionally, modifying a profile does not necessarily apply the address to the running interface until the connection is reactivated.
- ✗
ip link set ens3 address 172.16.5.20/24
Why it's wrong here
The ip link set command with the address keyword changes the hardware MAC address of the interface, not the IP address. Supplying an IPv4 address in that position would be rejected as an invalid link-layer address. This command cannot assign an IP and therefore does not meet the requirement.
- ✗
ifconfig ens3 172.16.5.20 netmask 255.255.255.0 up
Why it's wrong here
The ifconfig utility belongs to the deprecated net-tools package and is not installed by default on many current distributions. Even when present, it is considered legacy and its behavior can be inconsistent with modern network managers. The iproute2 ip command is the supported method for runtime address configuration on LFCS systems.
- ✓
ip addr add 172.16.5.20/24 dev ens3
Why this is correct
The ip addr add command from the iproute2 suite assigns an address to a specific interface for the current runtime. Because it does not write to any persistent configuration file, the address disappears after a reboot, which matches the requirement for a temporary change on an already-up interface.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
One of 406 original LFCS 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
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.