1nmstatectl(8) nmstatectl man page nmstatectl(8)
2
3
4
6 nmstatectl - A nmstate command line tool
7
9 nmstatectl show [INTERFACE_NAME] [--json]
10 nmstatectl set STATE_FILE_PATH [OPTIONS]
11 nmstatectl edit [INTERFACE_NAME] [OPTIONS]
12 nmstatectl rollback [CHECKPOINT_PATH]
13 nmstatectl commit [CHECKPOINT_PATH]
14
16 nmstatectl is created for users who want to try out nmstate without
17 using libnmstate.
18
19 show
20 Query the current network state. YAML is the default output for‐
21 mat. Use the --json argument to change the output format to
22 JSON. To limit the output state to include certain interfaces
23 only, please specify the interface name. Please be advised,
24 global config like DNS will be included.
25
26 For multiple interface names, use comma to separate them. You
27 can also use patterns for interface names:
28 * matches everything
29 ? matches any single character
30 [seq] matches any character in seq
31 [!seq] matches any character not in seq
32
33 For example, to show all interfaces starts with eth:
34 nmstatectl show eth\*
35 # The backslash is required to stop shell expanding '*'
36 to file names.
37
38 set
39 Apply the network state from specified file in YAML or JSON for‐
40 mat. By default, if the network state after state applied is
41 not identical to the desired state, nmstatectl rollbacks to the
42 state before set command. Use the --no-verify argument to skip
43 the verification.
44
45 edit
46 nmstatectl will invoke the text editor defined by environment
47 variable EDITOR for editing the network state in YAML format.
48 Once the text editor quit, nmstatectl will try to apply it using
49 "nmstatectl set".
50 If there is any syntax error, you will be asked to edit again.
51 Multiple interfaces are supported, check show for detail.
52
53 By default, if the network state after state applied is not
54 identical to the desired state, nmstatectl rollbacks to the
55 state before edit command. Use the --no-verify argument to skip
56 the verification.
57
58 nmstatectl supports manual transaction control which allows user to
59 decide whether rollback to previous (before "nmstatectl set/edit")
60 state.
61
62 rollback
63 rollback the network state from specified checkpoint file.
64 nmstatectl will take the latest checkpoint if not defined as
65 argument.
66
67 commit
68 commit the current network state. nmstatectl will take the lat‐
69 est checkpoint if not defined as argument.
70
72 --json
73 change the output format to JSON.
74
75 --no-verify
76 skip the desired network state verification.
77
78 --no-commit
79 create a checkpoint which later could be used for rollback or
80 commit. The checkpoint will be the last line of nmstatectl out‐
81 put, example: /org/freedesktop/NetworkManager/Checkpoint/1.
82
83 --timeout=<TIMEOUT>
84 the user must commit the changes within timeout, or they will be
85 automatically rolled back. Default: 60 seconds.
86
88 Report bugs on nmstate GitHub issues
89 <https://github.com/nmstate/nmstate>.
90
92 License LGPL-2.1 or any later version
93 <https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt>.
94
96 NetworkManager(8)
97
98
99
1000.2.6 February 24, 2020 nmstatectl(8)