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 show [-r, --running-config]
11 nmstatectl set STATE_FILE_PATH [OPTIONS]
12 nmstatectl apply STATE_FILE_PATH [OPTIONS]
13 nmstatectl edit [INTERFACE_NAME] [OPTIONS]
14 nmstatectl gc [STATE_FILE_PATH] [OPTIONS]
15 nmstatectl rollback [CHECKPOINT_PATH]
16 nmstatectl commit [CHECKPOINT_PATH]
17 nmstatectl service [-c, --config <CONFIG_FOLDER>]
18 nmstatectl version
19
21 nmstatectl is created for users who want to try out nmstate without us‐
22 ing libnmstate.
23
24 show
25 Query the current network state. YAML is the default output for‐
26 mat. Use the --json argument to change the output format to
27 JSON. To limit the output state to include certain interfaces
28 only, please specify the interface name. Please be advised,
29 global config like DNS will be included.
30
31 For multiple interface names, use comma to separate them. You
32 can also use patterns for interface names:
33 * matches everything
34 ? matches any single character
35 [seq] matches any character in seq
36 [!seq] matches any character not in seq
37
38 For example, to show all interfaces starts with eth:
39 nmstatectl show eth\*
40 # The backslash is required to stop shell expanding '*'
41 to file names.
42
43 set
44 "Set" command is deprecated. Please consider using "apply" in‐
45 stead.
46
47 Apply the network state from specified file in YAML or JSON for‐
48 mat. By default, if the network state after state applied is
49 not identical to the desired state, nmstatectl rollbacks to the
50 state before set command. Use the --no-verify argument to skip
51 the verification.
52
53 apply
54 Apply the network state from specified file in YAML or JSON for‐
55 mat. By default, if the network state after state applied is
56 not identical to the desired state, nmstatectl rollbacks to the
57 state before set command. Use the --no-verify argument to skip
58 the verification.
59
60 edit
61 nmstatectl will invoke the text editor defined by environment
62 variable EDITOR for editing the network state in YAML format.
63 Once the text editor quit, nmstatectl will try to apply it using
64 "nmstatectl set".
65 If there is any syntax error, you will be asked to edit again.
66 Multiple interfaces are supported, check show for detail.
67
68 By default, if the network state after state applied is not
69 identical to the desired state, nmstatectl rollbacks to the
70 state before edit command. Use the --no-verify argument to skip
71 the verification.
72
73 nmstatectl supports manual transaction control which allows user to de‐
74 cide whether rollback to previous (before "nmstatectl set/edit") state.
75
76 rollback
77 rollback the network state from specified checkpoint file. nm‐
78 statectl will take the latest checkpoint if not defined as argu‐
79 ment.
80
81 gc
82
83 Generates configuration files for specified network state
84 file(s). The output will be dictinary with plugin name as key
85 and an tuple as value. The tuple will holding configuration
86 file name and configuration content.
87
88 The generated configuration is not saved into system, users have
89 to do it by themselves after refering to the network backend.
90
91 commit
92 commit the current network state. nmstatectl will take the lat‐
93 est checkpoint if not defined as argument.
94 version
95 displays nmstate version.
96
97 service
98 Apply all network state files ending with .yml in specified( de‐
99 fault: /etc/nmstate) folder. The applied network state file
100 will be renamed with postfix .applied to prevent repeated ap‐
101 plied on next run.
102
103
105 --json
106 change the output format to JSON.
107
108 -r, --running-config
109 Showing the running network configuration.
110
111 -s, --show-secrets
112 Showing with the secrets. By default, nmstate is masking the
113 passwords by <_password_hid_by_nmstate>.
114
115
116 --no-verify
117 skip the desired network state verification.
118
119 --no-commit
120 create a checkpoint which later could be used for rollback or
121 commit. The checkpoint will be the last line of nmstatectl out‐
122 put, example: /org/freedesktop/NetworkManager/Checkpoint/1.
123
124 --memory-only
125 all the changes done will be non persistent, they are going to
126 be removed after rebooting.
127
128 --timeout=<TIMEOUT>
129 the user must commit the changes within timeout, or they will be
130 automatically rolled back. Default: 60 seconds.
131
132 --version
133 displays nmstate version.
134
136 * Maximum supported number of interfaces in a single desire state is
137 1000.
138
140 Report bugs on nmstate GitHub issues <https://github.com/nmstate/nm‐
141 state>.
142
144 License LGPL-2.1 or any later version <https://www.gnu.org/li‐
145 censes/old-licenses/lgpl-2.1.txt>.
146
148 NetworkManager(8)
149
150
151
1522.1.2 July 11, 2022 nmstatectl(8)