Which file is used to configure persistent network interface settings on a Debian-based system? Learn why /etc/network/interfaces is the traditional location for defining static and DHCP network configurations—essential for CompTIA Linux+ (Plus) XK0-005 exam success.
Table of Contents
Question
Which file is used to configure persistent network interface settings on a Debian-based system?
A. /etc/hosts
B. /etc/network/interfaces
C. /etc/resolv.conf
D. /etc/sysctl.conf
E. /etc/netplan/01-netcfg.yaml
Answer
B. /etc/network/interfaces
Explanation
On Debian-based systems, /etc/network/interfaces is traditionally used to define persistent network settings like IP addresses and gateways, a key networking configuration task.
The file used to configure persistent network interface settings on a Debian-based system is /etc/network/interfaces.
/etc/network/interfaces is the primary configuration file for defining network interfaces on Debian-based systems. It allows administrators to specify static IP addresses, DHCP settings, gateways, DNS servers, and other network parameters for each interface.
The file supports both basic and advanced configurations, including VLANs, bonding, and multiple IP addresses. For example, a static IP configuration might look like:
auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 8.8.4.4
Changes made to this file can be applied using the ifup and ifdown commands or by restarting the networking service.
In recent Debian releases, /etc/network/interfaces.d/ may also be used to store interface-specific configuration files, but /etc/network/interfaces remains the central and traditional location for persistent settings.
This approach ensures that network configurations persist across reboots and are automatically applied during system startup.
This file is the standard location for persistent network interface configuration on Debian-based systems, supporting both static and dynamic (DHCP) settings.
CompTIA Linux+ (Plus) XK0-005 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the CompTIA Linux+ (Plus) XK0-005 exam and earn CompTIA Linux+ (Plus) XK0-005 certification.