nmstatectl(8)

🌸 NAME 🌸

okay so bestie, welcome to nmstatectl β€” it's the nmstate command line tool, and it's literally the moment πŸ’…


✨ SYNOPSIS ✨

nmstatectl show [INTERFACE_NAME] [--json]
nmstatectl show [-r, --running-config]
nmstatectl set STATE_FILE_PATH [OPTIONS]
nmstatectl apply STATE_FILE_PATH [OPTIONS]
nmstatectl edit [INTERFACE_NAME] [OPTIONS]
nmstatectl gc [STATE_FILE_PATH] [OPTIONS]
nmstatectl rollback [CHECKPOINT_PATH]
nmstatectl commit [CHECKPOINT_PATH]
nmstatectl service [-c, --config <CONFIG_FOLDER>]
nmstatectl statistic STATE_FILE_PATH [-c, --current
<CURRENT_STATE_FILE>]
nmstatectl version

no cap, that's the whole vibe menu 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

nmstatectl exists for the girlies (and everyone else) who wanna try out nmstate without dragging libnmstate into it. it's giving "just let me poke at my network, please" ✨

🌈 show

Queries the current network state, bestie. YAML is the default output format β€” that's the standard, no notes πŸ’…. If you want JSON instead, pass the --json argument and watch it switch up.

Wanna limit the output to just certain interfaces? Say less β€” just specify the interface name. BUT ⚠️ heads up: global config like DNS will be included anyway. Also, nmstatectl s is an aliased command for nmstatectl show (iykyk, short and cute).

Got multiple interface names? Separate them with commas, periodt. You can also use patterns for interface names:

  • * β€” matches everything
  • ? β€” matches any single character
  • [seq] β€” matches any character in seq
  • [!seq] β€” matches any character not in seq

For example, to show all interfaces starting with eth:

nmstatectl show eth\*
# The backslash is required to stop shell expanding '*' to
file names.

like, do NOT forget that backslash or your shell will eat your glob alive 😭

πŸŽ€ set

okay so "Set" command is deprecated β€” please consider using "apply" instead, bestie, it's the glow-up version.

It applies the network state from the specified file in YAML or JSON format. By default, if the network state after the state is applied is not identical to the desired state, nmstatectl rolls back to the state before the set command. Wanna skip the verification? Use the --no-verify argument πŸ’…

⭐ apply

Applies the network state from the specified file in YAML or JSON format β€” this is the main character, honestly πŸ‘‘. Same deal as above: by default, if the network state after the state is applied is not identical to the desired state, nmstatectl rolls back to the state before the set command. Use --no-verify to skip the verification.

And nmstatectl a is an aliased command for nmstatectl apply β€” short queen πŸŽ€

🧚 edit

nmstatectl will invoke the text editor defined by the environment variable EDITOR so you can edit the network state in YAML format. Once you quit the text editor, nmstatectl will try to apply it using "nmstatectl set".

If there's any syntax error, you'll be asked to edit again (annoying but honestly fair πŸ™ˆ). Multiple interfaces are supported β€” check show for the deets.

By default, if the network state after the state is applied is not identical to the desired state, nmstatectl rolls back to the state before the edit command. Use --no-verify to skip the verification.

🫢 manual transaction control

nmstatectl supports manual transaction control, which lets you decide whether to roll back to the previous (before "nmstatectl set/edit") state. you're in charge, bestie πŸ’…

πŸ“ rollback

Rolls back the network state from the specified checkpoint file. If you don't define one as an argument, nmstatectl will just take the latest checkpoint β€” lazy girl friendly ✨

πŸ’œ gc

Generates configuration files for the specified network state file(s) πŸ“. The output will be a dictionary with the plugin name as key and a tuple as value. That tuple holds the configuration file name and the configuration content.

⚠️ real talk: the generated configuration is not saved into the system. Users have to do it by themselves after referring to the network backend. it's giving DIY, not auto-save 😭

🌸 commit

Commits the current network state. If you don't define a checkpoint as an argument, nmstatectl will take the latest checkpoint.

πŸ¦‹ version

Displays the nmstate version ✨

🌈 service

Applies all network state files ending with .yml in the specified folder (default: /etc/nmstate). Please refer to manpage nmstate.service(8) for detail, bestie 🫢

πŸŽ€ statistic

Generates statistic for the specified network state files. Multiple desire state files are supported πŸ’…. The --current <CURRENT_STATE_FILE> argument could instruct nmstate to read the current network state from the specified file instead of querying the current host β€” iconic.


πŸ’… OPTIONS πŸ’…

  • --json β€” changes the output format to JSON ✨
  • -r, --running-config β€” shows the running network configuration πŸ‘€
  • -s, --show-secrets β€” shows it with the secrets. By default though, nmstate is masking the passwords by <_password_hid_by_nmstate> 🫣
  • --no-verify β€” skips the desired network state verification. no thoughts, no checks πŸ’€
  • --no-commit β€” creates a checkpoint which later could be used for rollback or commit. The checkpoint will be the last line of nmstatectl output, example: /org/freedesktop/NetworkManager/Checkpoint/1 πŸŽ€
  • --memory-only β€” all the changes done will be non-persistent; they're going to be removed after rebooting. gone, reduced to atoms 😭
  • --timeout=<TIMEOUT> β€” the user must commit the changes within timeout, or they will be automatically rolled back. Default: 60 seconds ⏰
  • --override-iface β€” if defined when applying network state:
    • For interfaces section, any defined interface will be configured by the desired state information only; undefined properties of this interface will use the default value instead of merging from the current state.
    • For other sections, no changes to their original behavior.

For example, if the desired interface has no IPv4 section defined, nmstate will treat it as disabled regardless of the current network status. it's giving "we're doing it MY way" πŸ’…

  • --version β€” displays the nmstate version ✨

πŸ’€ LIMITATIONS πŸ’€

  • Maximum supported number of interfaces in a single desire state is 1000. that's the limit, bestie, don't push it 😭

πŸ”₯ BUG REPORTS πŸ”₯

Report bugs on nmstate GitHub issues https://github.com/nmstate/nmstate. don't suffer in silence, tell the maintainers 🫢


License Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0 β€” legal girl summer πŸ’…


🌈 SEE ALSO 🌈

NetworkManager(8)


and that's the whole page! this was nmstatectl from the nmstatectl man page, version 2.2.62, dated October 16, 2026 β€” go configure something cute, bestie, you got this πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from