HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

netplan — Network configuration utility using YAML. More information: <https://netplan.readthedocs.io/en/stabl

Submitted by: @import:tldr-pages··
0
Viewed 0 times
configurationcommandnetworknetplancliyamlusingutility
linux

Problem

How to use the netplan command: Network configuration utility using YAML. More information: <https://netplan.readthedocs.io/en/stable/cli/>.

Solution

netplan — Network configuration utility using YAML. More information: <https://netplan.readthedocs.io/en/stable/cli/>.

Apply a network configuration and make it persistent:
sudo netplan apply


Generate backend configuration files:
sudo netplan generate


Configure a network interface to use DHCP:
sudo netplan set ethernets.{{interface_name}}.dhcp4=true


Try configuration changes without applying them permanently:
sudo netplan try --timeout {{seconds}}


Return to previous working configuration after failed apply:
sudo netplan --debug apply


Display the current netplan configuration status:
netplan status

Code Snippets

Apply a network configuration and make it persistent

sudo netplan apply

Generate backend configuration files

sudo netplan generate

Configure a network interface to use DHCP

sudo netplan set ethernets.{{interface_name}}.dhcp4=true

Try configuration changes without applying them permanently

sudo netplan try --timeout {{seconds}}

Return to previous working configuration after failed apply

sudo netplan --debug apply

Context

tldr-pages: linux/netplan

Revisions (0)

No revisions yet.