LFCS Networking Practice Question
A system administrator needs to configure a static IPv4 address of 192.168.1.100/24 on interface eth0 using NetworkManager. Which command accomplishes this?
⚠ Common exam trap
Watch out — candidates often confuse `nmcli dev set` (device-level) with `nmcli con mod` (connection-level), or they use the singular `ipv4.address` instead of the plural `ipv4.addresses`, which is the correct property name in NetworkManager.
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 con mod eth0 ipv4.addresses 192.168.1.100/24 ipv4.method manual
`nmcli con mod` modifies an existing connection profile, and setting `ipv4.addresses` along with `ipv4.method manual` is the proper way to assign a static IPv4 address in NetworkManager. The `/24` prefix length is correctly specified as part of the address value, and the manual method disables DHCP for IPv4.
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 dev set eth0 ipv4.address 192.168.1.100/24
Why it's wrong here
The 'nmcli dev set' command is used for device-level settings, not IP configuration.
- ✗
nmcli con up eth0 ipv4.address 192.168.1.100/24
Why it's wrong here
The 'nmcli con up' command does not accept IP address parameters in that way.
- ✓
nmcli con mod eth0 ipv4.addresses 192.168.1.100/24 ipv4.method manual
Why this is correct
This correctly modifies the connection to use a static IP address and sets the method to manual.
- ✗
nmcli con add con-name eth0 type ethernet ipv4.address 192.168.1.100/24
Why it's wrong here
This creates a new connection instead of modifying the existing one, and the syntax is incomplete.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 507 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.