Which file is modified to configure networking on certain Linux distributions using netplan?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

In certain Linux distributions, particularly those based on Ubuntu starting from version 17.10, network configuration is handled through a utility called netplan. The configuration files for netplan are located in the /etc/netplan directory. These YAML files allow users to define network interfaces and their configurations in a structured format that is easy to read and modify.

When a user makes changes to the files in /etc/netplan, those changes take effect the next time the network configuration is applied using the netplan apply command. This approach replaces the older methods of network configuration, such as using ifupdown or direct edits to /etc/network/interfaces.

The other directories mentioned, such as /etc/sysconfig, are used in different Linux distributions (like CentOS and RHEL) for managing network configurations. The /etc/init.d directory contains scripts for managing system services, and /etc/resolv.conf is specifically used for configuring DNS resolution rather than general network settings. Therefore, /etc/netplan is the correct location for configuring networking via netplan on supported distributions.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy