LFCS Networking Practice Question
A system administrator needs to permanently configure a network interface named ens33 with a static IPv4 address of 192.168.1.100/24 and a default gateway of 192.168.1.1 on a system using NetworkManager. Which command should the administrator use to achieve this?
⚠ Common exam trap
Candidates often choose temporary commands like `ip addr add` or `ifconfig` because they work immediately, but the LFCS exam specifically tests the ability to make permanent changes using the system's network management service (NetworkManager) rather than transient runtime commands.
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
✓
nmcli connection modify 'ens33' ipv4.addresses 192.168.1.100/24 ipv4.gateway 192.168.1.1 ipv4.method manual
It uses the `nmcli` command to modify the NetworkManager connection profile for interface ens33, setting a static IPv4 address with CIDR notation and a default gateway, and explicitly setting the method to 'manual' to ensure the configuration persists across reboots. NetworkManager is the default network service on modern Linux distributions, and `nmcli` is the proper tool for permanent configuration 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 connection modify 'ens33' ipv4.addresses 192.168.1.100/24 ipv4.gateway 192.168.1.1 ipv4.method manual
Why this is correct
The `nmcli connection modify` command writes the static IPv4 address, prefix and default gateway into the NetworkManager connection profile, and `ipv4.method manual` disables DHCP so the settings survive reboot. This satisfies the requirement for a permanent configuration, unlike `ip addr add`, which only changes the running kernel state.
- ✗
ip addr add 192.168.1.100/24 dev ens33
Why it's wrong here
The ip command applies the address to the running kernel only, so it disappears on reboot or NetworkManager reactivation. It is tempting because it configures ens33 immediately and is the standard tool for temporary addressing, and would be correct when testing connectivity before committing a persistent profile.
- ✗
ifconfig ens33 192.168.1.100 netmask 255.255.255.0 up
Why it's wrong here
ifconfig writes directly to the interface without creating a NetworkManager connection profile, so the address is lost on restart and NetworkManager may overwrite it. It is tempting because it sets address, netmask and link state in one legacy command, and would be correct on systems managed by ifupdown or sysvinit scripts.
- ✗
route add default gw 192.168.1.1 ens33
Why it's wrong here
route add default gw installs only a default route in the live kernel table; it assigns no IPv4 address to ens33 and is not persistent. It is tempting because it is the classic gateway command, and would be correct for temporarily adding a default route to an interface that already holds a configured address.
Visual reference
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
Courseiva writes every LFCS question from scratch — 406 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.