.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "netplan-generate" "8" "" "" "" .hy .SH NAME .PP netplan-generate - generate backend configuration from netplan YAML files .SH SYNOPSIS .PP \f[B]netplan\f[R] [--debug] \f[B]generate\f[R] -h | --help .PP \f[B]netplan\f[R] [--debug] \f[B]generate\f[R] [--root-dir \f[I]ROOT_DIR\f[R]] [--mapping \f[I]MAPPING\f[R]] .SH DESCRIPTION .PP netplan generate converts netplan YAML into configuration files understood by the backends (\f[B]systemd-networkd\f[R](8) or \f[B]NetworkManager\f[R](8)). It \f[I]does not\f[R] apply the generated configuration. .PP You will not normally need to run this directly as it is run by \f[B]netplan apply\f[R], \f[B]netplan try\f[R], or at boot. .PP Only if executed during the systemd \f[V]initializing\f[R] phase (i.e. \[dq]Early bootup, before \f[V]basic.target\f[R] is reached\[dq]), will it attempt to start/apply the newly created service units. \f[B]Requires feature: generate-just-in-time\f[R] .PP For details of the configuration file format, see \f[B]netplan\f[R](5). .SH OPTIONS .TP -h, --help Print basic help. .TP --debug Print debugging output during the process. .TP --root-dir \f[I]ROOT_DIR\f[R] Instead of looking in /{lib,etc,run}/netplan, look in /\f[I]ROOT_DIR\f[R]/{lib,etc,run}/netplan .TP --mapping \f[I]MAPPING\f[R] Instead of generating output files, parse the configuration files and print some internal information about the device specified in \f[I]MAPPING\f[R]. .SH HANDLING MULTIPLE FILES .PP There are 3 locations that netplan generate considers: .IP \[bu] 2 /lib/netplan/*.yaml .IP \[bu] 2 /etc/netplan/*.yaml .IP \[bu] 2 /run/netplan/*.yaml .PP If there are multiple files with exactly the same name, then only one will be read. A file in /run/netplan will shadow - completely replace - a file with the same name in /etc/netplan. A file in /etc/netplan will itself shadow a file in /lib/netplan. .PP Or in other words, /run/netplan is top priority, then /etc/netplan, with /lib/netplan having the lowest priority. .PP If there are files with different names, then they are considered in lexicographical order - regardless of the directory they are in. Later files add to or override earlier files. For example, /run/netplan/10-foo.yaml would be updated by /lib/netplan/20-abc.yaml. .PP If you have two files with the same key/setting, the following rules apply: .IP \[bu] 2 If the values are YAML boolean or scalar values (numbers and strings) the old value is overwritten by the new value. .IP \[bu] 2 If the values are sequences, the sequences are concatenated - the new values are appended to the old list. .IP \[bu] 2 If the values are mappings, netplan will examine the elements of the mappings in turn using these rules. .SH SEE ALSO .PP \f[B]netplan\f[R](5), \f[B]netplan-apply\f[R](8), \f[B]netplan-try\f[R](8), \f[B]systemd-networkd\f[R](8), \f[B]NetworkManager\f[R](8) .SH AUTHORS Daniel Axtens ().