How-to guides

This is a collection of how-to guides for common scenarios. If you see a scenario missing or have one to contribute, file an issue against this documentation with the example.

To configure Netplan, save configuration files in the /etc/netplan/ directory with a .yaml extension (e.g. /etc/netplan/config.yaml), then run sudo netplan apply. This command parses and applies the configuration to the system. Configuration written to disk under /etc/netplan/ persists between reboots. Visit Applying new Netplan configuration for detailed guidance.

For each of the examples below, use the renderer that applies to your scenario. For example, for Ubuntu Desktop, the renderer is usually NetworkManager. For Ubuntu Server, it is networkd.

Quick configuration examples

YAML configuration snippets for these examples, as well as additional examples, are available in the examples directory on GitHub.

Complex how-to guides

Documentation