table of contents
nmstatectl(8) | nmstatectl man page | nmstatectl(8) |
NAME¶
nmstatectl - A nmstate command line tool
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 version
nmstatectl varlink [UNIX_FILE_SOCKET_PATH]
DESCRIPTION¶
nmstatectl is created for users who want to try out nmstate without using libnmstate.
show
For multiple interface names, use comma to separate them. You can also use patterns for interface names:
? matches any single character
[seq] matches any character in seq
[!seq] matches any character not in seq
For example, to show all interfaces starts with eth:
# The backslash is required to stop shell expanding '*' to file names.
set
Apply the network state from specified file in YAML or JSON format. By default, if the network state after state applied is not identical to the desired state, nmstatectl rollbacks to the state before set command. Use the --no-verify argument to skip the verification.
apply
edit
If there is any syntax error, you will be asked to edit again. Multiple interfaces are supported, check show for detail.
By default, if the network state after state applied is not identical to the desired state, nmstatectl rollbacks to the state before edit command. Use the --no-verify argument to skip the verification.
nmstatectl supports manual transaction control which allows user to decide whether rollback to previous (before "nmstatectl set/edit") state.
- rollback
- rollback the network state from specified checkpoint file. nmstatectl will take the latest checkpoint if not defined as argument.
gc
The generated configuration is not saved into system, users have to do it by themselves after refering to the network backend.
commit
varlink
example: nmstatectl varlink /run/nmstate.so &
OPTIONS¶
--json
-r, --running-config
-s, --show-secrets
- --no-verify
- skip the desired network state verification.
- --no-commit
- create 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 are going to be removed after rebooting.
- --timeout=<TIMEOUT>
- the user must commit the changes within timeout, or they will be automatically rolled back. Default: 60 seconds.
- --version
- displays nmstate version.
LIMITATIONS¶
* Maximum supported number of interfaces in a single desire state is 1000.
BUG REPORTS¶
Report bugs on nmstate GitHub issues <https://github.com/nmstate/nmstate>.
COPYRIGHT¶
License LGPL-2.1 or any later version <https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt>.
SEE ALSO¶
January 12, 2024 | 1.4.5 |