Courseiva
NetworkingeasyMultiple SelectObjective-mapped

LFCS Networking Practice Question

Which TWO methods can be used to set a static IPv4 address on a CentOS 7 system? (Choose two.)

⚠ Common exam trap

Many candidates confuse temporary runtime commands like 'ip addr add' with permanent configuration methods, or they assume that systemctl can be used for network configuration because it is a common system administration tool.

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

Use the nmtui utility

Nmtui is a text-based user interface for NetworkManager, which is the default networking service on CentOS 7. It allows you to interactively configure network interfaces, including setting a static IPv4 address, without needing to manually edit configuration files. Option E is correct because the ifcfg-eth0 file in /etc/sysconfig/network-scripts is the traditional, direct configuration method for network interfaces on CentOS 7, where you can set BOOTPROTO=static and define IPADDR, PREFIX, and GATEWAY.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Run the command 'systemctl set-static-ip eth0 192.168.1.100/24'

    Why it's wrong here

    This command does not exist.

  • Use 'ip addr add 192.168.1.100/24 dev eth0'

    Why it's wrong here

    This only sets the address at runtime; not persistent.

  • Use the nmtui utility

    Why this is correct

    nmtui is a text-based tool for NetworkManager configuration, including static IP.

  • Edit the /etc/network/interfaces file

    Why it's wrong here

    This file is used by Debian-based systems, not CentOS.

  • Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file directly

    Why this is correct

    Direct editing is still valid on CentOS 7, provided NetworkManager is configured to read it.

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 →

How Courseiva writes practice questions · Editorial policy

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.