2025-03-07 10:50:20 +03:30
|
|
|
# netplan
|
|
|
|
|
|
|
|
> Network configuration utility using YAML.
|
2025-07-19 04:26:10 +03:00
|
|
|
> More information: <https://netplan.readthedocs.io/en/stable/cli/>.
|
2025-03-07 10:50:20 +03:30
|
|
|
|
|
|
|
- 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:
|
|
|
|
|
2025-07-19 04:26:10 +03:00
|
|
|
`sudo netplan try --timeout {{seconds}}`
|
2025-03-07 10:50:20 +03:30
|
|
|
|
|
|
|
- Return to previous working configuration after failed apply:
|
|
|
|
|
|
|
|
`sudo netplan --debug apply`
|
|
|
|
|
|
|
|
- Display the current netplan configuration status:
|
|
|
|
|
|
|
|
`netplan status`
|