Which file should be edited to configure a network interface on a Linux system?

Prepare for the Cisco Network Programmability Design and Implementation Specialist Exam. Study with flashcards and multiple choice questions, with hints and explanations for each question. Ace your exam with confidence!

The file that should be edited to configure a network interface on a Linux system is /etc/network/interfaces. This file is specifically designed to define how network interfaces are configured at boot time or while the system is running. It includes settings such as the IP address, netmask, gateway, and other related configurations for the network interfaces on the host. By editing this file, a system administrator can specify whether an interface should be static or dynamic (using DHCP), as well as set various interface properties.

The other files listed serve different purposes. For instance, /etc/resolv.conf is used to configure DNS name resolution; it contains information about nameservers. /etc/nsswitch.conf determines how the system retrieves various system databases, like user accounts and hostnames, and does not directly handle network interface configuration. Lastly, /etc/hosts is a static table used for hostname resolution and does not pertain to the configuration of network interfaces. Each of these files plays a key role in a Linux system, but when it comes to configuring network interfaces, /etc/network/interfaces is the correct choice.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy