Home / Alt manpages / netplan-info(8)

  • netplan-info(8)
  • Admin command
  • linux

Inspect Netplan Features Safely with netplan info

You will finish with a reliable way to see which Netplan features the installed package advertises, choose readable YAML or machine-friendly JSON output, and confirm the command's result without touching live networking. The examples use Netplan 1.1.2 from package netplan.io, installed here as 1.1.2-8ubuntu1~24.04.3. Other package releases may list different features.

Allow about ten minutes. You need a shell and the netplan.io package. This guide is read-only: it does not edit /etc/netplan/, generate backend configuration, apply a configuration, restart a network service or require sudo.

1. Confirm the command and package version

Start by checking that the Netplan executable is present and recording the installed package version. These are ordinary commands and do not need elevated privileges:

$ command -v netplan
/usr/sbin/netplan
$ dpkg-query -W -f='${Package} ${Version}\n' netplan.io
netplan.io 1.1.2-8ubuntu1~24.04.3

The manpage names this operation netplan info, although the installed executable is the general netplan command. Do not confuse it with netplan status: info reports advertised package features, while status queries the state of networking that is already running.

Checkpoint

You have confirmed the executable and captured a version string. If command -v finds nothing, stop and install or repair the package through your normal operating system process rather than guessing at another binary.

2. Read the default human-friendly output

Run the command without a format option:

$ netplan info
netplan.io:
  website: "https://netplan.io/"
  features:
  - dhcp-use-domains
  - auth-phase2
  - ipv6-mtu
  - modems
  - sriov
  - openvswitch
  - activation-mode
  - eswitch-mode
  - infiniband
  - regdom
  - vrf
  - vxlan
  - virtual-ethernet
  - dbus-config
  - generate-just-in-time
  - generated-supplicant
  - default-routes

The default is YAML. The top-level key identifies the package, website points to the project site, and features is the list this installation reports. Feature names are capabilities exposed by this Netplan build; they are not configuration keys to paste into a YAML file.

Capture the exit status immediately if a script or check depends on success:

$ netplan info > /tmp/netplan-info.yaml
$ status=$?
$ printf 'netplan info exit status: %s\n' "$status"
netplan info exit status: 0

The temporary file is optional. If you use it, remove it when you have finished reviewing the output:

$ rm -- /tmp/netplan-info.yaml

That removal is safe because the file contains a copied feature report, not Netplan configuration. Never redirect output over a file in /etc/netplan/ as part of this check.

3. Request JSON for scripts

Use --json when another program needs to parse the result. It prints the same information as JSON:

$ netplan info --json
{
  "netplan.io": {
    "website": "https://netplan.io/",
    "features": [
      "dhcp-use-domains",
      "auth-phase2",
      "ipv6-mtu",
      "modems",
      "sriov",
      "openvswitch",
      "activation-mode",
      "eswitch-mode",
      "infiniband",
      "regdom",
      "vrf",
      "vxlan",
      "virtual-ethernet",
      "dbus-config",
      "generate-just-in-time",
      "generated-supplicant",
      "default-routes"
    ]
  }
}

For a shell pre-flight check, test the exit status rather than matching a particular feature list. The list can change when Netplan is upgraded:

if netplan info --json > /tmp/netplan-info.json; then
    printf '%s\n' 'Netplan feature query succeeded'
else
    status=$?
    printf 'Netplan feature query failed with status %s\n' "$status" >&2
    exit "$status"
fi
rm -- /tmp/netplan-info.json

This example creates and removes a temporary report. It does not modify network configuration. If the output must be retained, choose a deliberate, access-controlled location instead of leaving diagnostic files in a shared temporary directory.

4. Select YAML explicitly when format matters

--yaml makes the default explicit, which can make an operational script or runbook easier to understand:

$ netplan info --yaml
netplan.io:
  website: "https://netplan.io/"
  features:
  - dhcp-use-domains
  - auth-phase2
  - ipv6-mtu
  - modems
  - sriov
  - openvswitch
  - activation-mode
  - eswitch-mode
  - infiniband
  - regdom
  - vrf
  - vxlan
  - virtual-ethernet
  - dbus-config
  - generate-just-in-time
  - generated-supplicant
  - default-routes

The format switches are alternatives. Use one of --json or --yaml for a clear contract. Do not treat the output as a network configuration document: feeding it to netplan apply is not a valid way to enable a feature.

5. Use debug output only while investigating

Put the global --debug option before info when you need diagnostic output:

$ netplan --debug info
netplan.io:
  website: "https://netplan.io/"
  features:
  - dhcp-use-domains
  - auth-phase2
  - ipv6-mtu
  - modems
  - sriov
  - openvswitch
  - activation-mode
  - eswitch-mode
  - infiniband
  - regdom
  - vrf
  - vxlan
  - virtual-ethernet
  - dbus-config
  - generate-just-in-time
  - generated-supplicant
  - default-routes

Debugging is a reporting choice, not a repair action. If the command fails, first run netplan info --help, check that you used the installed command syntax, and inspect the package version. Do not jump to sudo: this read-only query normally needs no privilege, and elevation will not add a feature missing from the installed build.

Done means

  • You confirmed the installed netplan executable and netplan.io version.
  • You ran netplan info and saw the feature list for this package.
  • You know that YAML is the default and that --json is available for parsing.
  • You checked the command's exit status immediately after a query that mattered.
  • You kept the report separate from /etc/netplan/ and made no network state changes.