34e988eca6419ebfe752dc8517306d1141ef9619
[NetworkManager.git] / man / nmcli.1.in
1 .\" nmcli (1) manual page
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
12 .\"
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 .\" GNU General Public License for more details.
17 .\"
18 .\" You should have received a copy of the GNU General Public Licence along
19 .\" with this manual; if not, write to the Free Software Foundation, Inc.,
20 .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 .\"
22 .\" Copyright 2010 - 2015 Red Hat, Inc.
23 .\"
24 .TH NMCLI "1" "2016-03-09" "NetworkManager 1.2"
25
26 .SH NAME
27 nmcli \- command\(hyline tool for controlling NetworkManager
28 .SH SYNOPSIS
29 .ad l
30 .B nmcli
31 .RI " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
32 .BR help " } "
33 .sp
34
35 .IR OBJECT " := { "
36 .BR general " | " networking " | " radio " | " connection " | " device " | " agent " | " monitor
37 .RI " }"
38 .sp
39
40 .IR OPTIONS " := { "
41 .br
42 \fB\-t\fR[\fIerse\fR]
43 .br
44 \fB\-p\fR[\fIretty\fR]
45 .br
46 \fB\-m\fR[\fImode\fR] tabular | multiline
47 .br
48 \fB\-c\fR[\fIcolors\fR] auto | yes | no
49 .br
50 \fB\-f\fR[\fIields\fR] <field1,field2,...> | all | common
51 .br
52 \fB\-e\fR[\fIscape\fR] yes | no
53 .br
54 \fB\-n\fR[\fIocheck\fR]
55 .br
56 \fB\-a\fR[\fIsk\fR]
57 .br
58 \fB\-s\fR[\fIhow-secrets\fR]
59 .br
60 \fB\-w\fR[\fIait\fR] <seconds>
61 .br
62 \fB\-v\fR[\fIersion\fR]
63 .br
64 \fB\-h\fR[\fIelp\fR]
65 .br
66 .RI "}"
67
68 .SH DESCRIPTION
69 .B nmcli
70 is a command\(hyline tool for controlling NetworkManager and reporting network
71 status. It can be utilized as a replacement for \fInm\(hyapplet\fP or other
72 graphical clients. \fInmcli\fP is used to create, display, edit, delete, activate,
73 and deactivate network connections, as well as control and display network device
74 status.
75 .P
76 Typical uses include:
77 .IP \(em 4
78 Scripts: utilize NetworkManager via \fInmcli\fP instead of managing network
79 connections manually.  \fInmcli\fP supports a terse output format which is better
80 suited for script processing. Note that NetworkManager can also execute scripts,
81 called "dispatcher scripts", in response to network events. See
82 \fBNetworkManager\fP for details about these dispatcher scripts.
83 .IP \(em 4
84 Servers, headless machines, and terminals:  \fInmcli\fP can be used to control
85 NetworkManager without a GUI, including creating, editing, starting and stopping
86 network connections and viewing network status.
87 .SS \fIOPTIONS\fP
88 .TP
89 .B \-t, \-\-terse
90 Output is terse.  This mode is designed and suitable for computer (script)
91 processing.
92 .TP
93 .B \-p, \-\-pretty
94 Output is pretty. This causes \fInmcli\fP to produce easily readable outputs
95 for humans, i.e. values are aligned, headers are printed, etc.
96 .TP
97 .B \-m, \-\-mode tabular | multiline
98 Switch between \fItabular\fP and \fImultiline\fP output.
99 If omitted, default is \fItabular\fP for most commands. For the commands
100 producing more structured information, that cannot be displayed on a single
101 line, default is \fImultiline\fP. Currently, they are:
102 .br
103 .nf
104   'nmcli connection show <ID>'
105   'nmcli device show'
106 .fi
107 \fItabular\fP   \(en Output is a table where each line describes a single entry.
108 Columns define particular properties of the entry.
109 .br
110 \fImultiline\fP \(en Each entry comprises multiple lines, each property on its own
111 line. The values are prefixed with the property name.
112 .TP
113 .B \-c, \-\-colors auto|yes|no
114 This option controls color output (using terminal escape sequences). \fIyes\fP
115 enables colors, \fIno\fP disables them, \fIauto\fP only produces colors when
116 standard output is directed to a terminal. The default value is \fIauto\fP.
117 .TP
118 .B \-f, \-\-fields <field1,field2,...> | all | common
119 This option is used to specify what fields (column names) should be printed.
120 Valid field names differ for specific commands. List available fields by
121 providing an invalid value to the \fI\-\-fields\fP option.
122 .br
123 \fIall\fP is used to print all valid field values of the command.
124 \fIcommon\fP is used to print common field values of the command.
125 If omitted, default is \fIcommon\fP.
126 The option is mandatory when \fI\-\-terse\fP is used.  In this case, generic
127 values \fIall\fP and \fIcommon\fP cannot be used.  (This is to maintain
128 compatibility when new fields are added in the future).
129 .TP
130 .B \-e, \-\-escape yes | no
131 Whether to escape ':' and '\\' characters in terse tabular mode.  The escape
132 character is '\\'.
133 If omitted, default is \fIyes\fP.
134 .TP
135 .B \-n, \-\-nocheck
136 This option can be used to force \fInmcli\fP to skip checking \fInmcli\fP and
137 \fINetworkManager\fP version compatibility. Use it with care, because using
138 incompatible versions may produce incorrect results.
139 .TP
140 .B \-a, \-\-ask
141 When using this option \fInmcli\fP will stop and ask for any missing required
142 arguments, so do not use this option for non-interactive purposes like scripts.
143 This option controls, for example, whether you will be prompted for a password
144 if it is required for connecting to a network.
145 .TP
146 .B \-s, \-\-show-secrets
147 When using this option \fInmcli\fP will display passwords and secrets that might
148 be present in an output of an operation. This option also influences echoing
149 passwords typed by user as an input.
150 .TP
151 .B \-w, \-\-wait <seconds>
152 This option sets a timeout period for which \fInmcli\fP will wait for \fINetworkManager\fP
153 to finish operations. It is especially useful for commands that may take a longer time to
154 complete, e.g. connection activation.
155 Specifying a value of \fB0\fP instructs \fInmcli\fP not to wait but to exit immediately
156 with a status of success. The default value depends on the executed command.
157 .TP
158 .B \-v, \-\-version
159 Show \fInmcli\fP version.
160 .TP
161 .B \-h, \-\-help
162 Print help information.
163 .SS \fIOBJECT\fP
164 .TP
165 .B general \- general \fINetworkManager\fP status and operations
166 .br
167 Use this object to show NetworkManager status and permissions. You can also get
168 and change system hostname, as well as NetworkManager logging level and domains.
169 .TP
170 .SS \fICOMMAND\fP := { status | hostname | permissions | logging }
171 .sp
172 .RS
173 .TP
174 .B status
175 .br
176 Show overall status of NetworkManager. This is the default action, when no additional
177 command is provided for \fIgeneral\fP object.
178 .TP
179 .B hostname [<hostname>]
180 .br
181 Get and change system hostname. With no arguments, this prints currently configured hostname.
182 When you pass a hostname, it will be handed over to NetworkManager to be set as a new system
183 hostname.
184 .br
185 Note that the term \fBsystem\fP hostname may also be referred to as \fBpersistent\fP or
186 \fBstatic\fP by other programs or tools. The hostname is stored in /etc/hostname
187 file in most distributions. For example, systemd-hostnamed service uses the term
188 \fBstatic\fP hostname and it only reads the /etc/hostname file when it starts.
189 .TP
190 .B permissions
191 .br
192 Show the permissions a caller has for various authenticated operations that
193 NetworkManager provides, like enable and disable networking, changing Wi\(hyFi
194 and WWAN state, modifying connections, etc.
195 .TP
196 .B logging [level <log level>] [domains <log domains>]
197 .br
198 Get and change \fINetworkManager\fP logging level and domains. Without any argument
199 current logging level and domains are shown. In order to change logging state, provide
200 \fIlevel\fP and, or, \fIdomain\fP parameters. See \fBNetworkManager.conf\fP for available
201 level and domain values.
202 .RE
203
204 .TP
205 .B networking \- get or set general networking state of NetworkManager
206 .br
207 Use this object to show NetworkManager networking status, or to enable and disable
208 networking. Disabling networking removes the configuration from all devices and
209 changes them to the 'unmanaged' state.
210 .TP
211 .SS \fICOMMAND\fP := { [ on | off | connectivity ] }
212 .sp
213 .RS
214 .TP
215 .B [ on | off ]
216 .br
217 Get networking\(hyenabled status or enable and disable networking by NetworkManager.
218 All interfaces managed by NetworkManager are deactivated when networking has
219 been disabled.
220 .TP
221 .B connectivity [check]
222 .br
223 Get network connectivity state.
224 The optional \fIcheck\fP argument tells NetworkManager to re-check the connectivity,
225 else the most recent known connectivity state is displayed without re-checking.
226 .br
227 Possible states are:
228 .RS
229 .PP
230 .IP \fInone\fP 9
231 \(en the host is not connected to any network
232 .IP \fIportal\fP 9
233 \(en the host is behind a captive portal and cannot reach the full Internet
234 .IP \fIlimited\fP 9
235 \(en the host is connected to a network, but it has no access to the Internet
236 .IP \fIfull\fP 9
237 \(en the host is connected to a network and has full access to the Internet
238 .IP \fIunknown\fP 9
239 \(en the connectivity status cannot be found out
240 .RE
241 .RE
242
243 .TP
244 .B radio \- get or set radio switch states
245 .br
246 Use this object to show radio switches status, or enable and disable
247 the switches.
248 .TP
249 .SS \fICOMMAND\fP := { all | wifi | wwan }
250 .sp
251 .RS
252 .TP
253 .B wifi [ on | off ]
254 .br
255 Show or set status of Wi\(hyFi in NetworkManager. If no arguments are supplied,
256 Wi\(hyFi status is printed; \fIon\fP enables Wi\(hyFi; \fIoff\fP disables Wi\(hyFi.
257 .TP
258 .B wwan [ on | off ]
259 .br
260 Show or set status of WWAN (mobile broadband) in NetworkManager. If no arguments
261 are supplied, mobile broadband status is printed; \fIon\fP enables mobile broadband,
262 \fIoff\fP disables it.
263 .TP
264 .B all [ on | off ]
265 .br
266 Show or set all previously mentioned radio switches at the same time.
267 .RE
268
269 .TP
270 .B monitor \- monitor NetworkManager
271 .br
272 Use this object to observe NetworkManager activity. Watches for changes
273 in connectivity state, devices or connection profiles.
274 .br
275 See also \fImonitor\fP command of \fIconnection\fP or \fIdevice\fP object
276 to watch for changes in certain objects or object classes.
277 .RE
278
279 .TP
280 .B connection \- start, stop, and manage network connections
281 .sp
282 NetworkManager stores all network configuration as \fIconnections\fP, which are
283 collections of data (Layer2 details, IP addressing, etc.) that describe
284 how to create or connect to a network.  A connection is \fIactive\fP when
285 a device uses that connection's configuration to create or connect to a network.
286 There may be multiple connections that apply to a device, but only one of them
287 can be active on that device at any given time. The additional connections can
288 be used to allow quick switching between different networks and configurations.
289 .sp
290 Consider a machine which is usually connected to a DHCP-enabled network, but
291 sometimes connected to a testing network which uses static IP addressing.  Instead
292 of manually reconfiguring eth0 each time the network is changed, the settings can
293 be saved as two connections which both apply to eth0, one for DHCP (called
294 "default") and one with the static addressing details (called "testing").  When
295 connected to the DHCP-enabled network the user would run "nmcli con up default"
296 , and when connected to the static network the user would run "nmcli con up testing".
297 .TP
298 .SS \fICOMMAND\fP := { show | up | down | add | edit | modify | delete | monitor | reload | load }
299 .sp
300 .RS
301 .TP
302 .B show [--active]
303 .br
304 List in-memory and on-disk connection profiles, some of which may also be
305 active if a device is using that connection profile. Without a parameter, all
306 profiles are listed. When --active option is specified, only the active profiles
307 are shown.
308 .TP
309 .B show [--active] [--order <order spec>] [ id | uuid | path | apath ] <ID> ...
310 .br
311 Show details for specified connections. By default, both static configuration
312 and active connection data are displayed.  When --active option is specified,
313 only the active profiles are taken into account. Use global --show-secrets option
314 to display secrets associated with the profile.
315 .sp
316 Ordering:
317 .br
318 The --order option can be used to get custom ordering of connections. The
319 connections can be ordered by active status, name, type or D-Bus path. If
320 connections are equal according to a sort order category, an additional
321 category can be specified.
322 The default sorting order is equivalent to "--order active:name:path".
323 .sp
324 <order spec> := category:category:...
325 .br
326 category := [+-]active | [+-]name | [+-]type | [+-]path
327 .br
328 \fI+\fP or no prefix means sorting in ascending order (alphabetically or in numbers).
329 .br
330 \fI-\fP means reverse (descending) order.
331 .br
332 The category names can be abbreviated (e.g. --order -a:na)
333 .sp
334 \fIid\fP, \fIuuid\fP, \fIpath\fP and \fIapath\fP keywords can be used if
335 \fI<ID>\fP is ambiguous.
336 .RS
337 .PP
338 Optional <ID>-specifying keywords are:
339 .IP \fIid\fP 13
340 \(en the <ID> denotes a connection name
341 .IP \fIuuid\fP 13
342 \(en the <ID> denotes a connection UUID
343 .IP \fIpath\fP 13
344 \(en the <ID> denotes a D-Bus static connection path
345 in the format of /org/freedesktop/NetworkManager/Settings/<num> or just <num>
346 .IP \fIapath\fP 13
347 \(en the <ID> denotes a D-Bus active connection path
348 in the format of /org/freedesktop/NetworkManager/ActiveConnection/<num> or just <num>
349 .PP
350 It is possible to filter the output using the global \fI--fields\fP option. Use the following
351 values:
352 .RE
353 .RS
354 .PP
355 .IP \fIprofile\fP 13
356 \(en only shows static profile configuration
357 .IP \fIactive\fP 13
358 \(en only shows active connection data (when the profile is active)
359 .PP
360 You can also specify particular fields. For static configuration, use setting and property names
361 as described in \fInm-settings\fP(5) manual page. For active data use GENERAL, IP4, DHCP4, IP6,
362 DHCP6, VPN.
363 .PP
364 When no command is given to the \fIconnection\fP object, the default action
365 is 'nmcli connection show'.
366 .RE
367 .TP
368 .B up [ id | uuid | path ] <ID> [ifname <ifname>] [ap <BSSID>] [passwd-file <file with passwords>]
369 .RE
370 .RS
371 .B up ifname <ifname> [ap <BSSID>] [passwd-file <file with passwords>]
372 .RS
373 .br
374 Activate a connection.  The connection is identified by its name, UUID or D-Bus
375 path. If <ID> is ambiguous, a keyword \fIid\fP, \fIuuid\fP or \fIpath\fP can be
376 used.  When requiring a particular device to activate the connection on, the
377 \fIifname\fP option with interface name should be given.  If the <ID> is not
378 given an \fIifname\fP is required, and NetworkManager will activate the best
379 available connection for the given \fIifname\fP.  In case of a VPN connection,
380 the \fIifname\fP option specifies the device of the base connection. The
381 \fIap\fP option specify what particular AP should be used in case of a Wi\(hyFi
382 connection.
383 .br
384 If '--wait' option is not specified, the default timeout will be 90 seconds.
385 .br
386 See \fBconnection show\fP above for the description of the <ID>-specifying keywords.
387 .RS
388 .PP
389 Available options are:
390 .IP \fIifname\fP 13
391 \(en interface that will be used for activation
392 .IP \fIap\fP 13
393 \(en BSSID of the AP which the command should connect to (for Wi\(hyFi connections)
394 .IP \fIpasswd-file\fP 13
395 \(en some networks may require credentials during activation. You can give these
396 credentials using this option.
397 Each line of the file should contain one password in the form of
398 .br
399 \fBsetting_name.property_name:the password\fP
400 .br
401 For example, for WPA Wi-Fi with PSK, the line would be
402 .br
403 \fI802-11-wireless-security.psk:secret12345\fP
404 .br
405 For 802.1X password, the line would be
406 .br
407 \fI802-1x.password:my 1X password\fP
408 .br
409 nmcli also accepts "wifi-sec" and "wifi" strings instead of "802-11-wireless-security".
410 When NetworkManager requires a password and it is not given, nmcli will ask for it
411 when run with --ask. If --ask was not passed, NetworkManager can ask another secret
412 agent that may be running (typically a GUI secret agent, such as nm-applet or
413 gnome-shell).
414 .RE
415 .RE
416 .TP
417 .B down [ id | uuid | path | apath ] <ID> ...
418 .br
419 Deactivate a connection from a device without preventing the device from
420 further auto-activation. Multiple connections can be passed to the command. 
421 .sp
422 Be aware that this command deactivates the specified active connection, but the device
423 on which the connection was active, is still ready to connect and will perform
424 auto-activation by looking for a suitable connection that has the 'autoconnect'
425 flag set. This includes the just deactivated connection. So if the connection is set
426 to auto-connect, it will be automatically started on the disconnected device again.
427 .br
428 In most cases you may want to use \fIdevice disconnect\fP command instead.
429 .sp
430 The connection is identified by its name, UUID or D-Bus path.
431 If <ID> is ambiguous, a keyword \fIid\fP, \fIuuid\fP, \fIpath\fP or
432 \fIapath\fP can be used.
433 .br
434 See \fBconnection show\fP above for the description of the <ID>-specifying keywords.
435 .br
436 If '--wait' option is not specified, the default timeout will be 10 seconds.
437 .TP
438 .B add COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS SLAVE_OPTIONS IP_OPTIONS [-- [+|-]<setting>.<property> <value> ...]
439 .br
440 Add a connection for NetworkManager. Arguments differ according to connection types, see below.
441 .RS
442 .TP
443 .B COMMON_OPTIONS:
444 .IP "\fItype <type>\fP" 42
445 \(en connection type; see below \fBTYPE_SPECIFIC_OPTIONS\fP for allowed values; (mandatory)
446 Note that types \fIbond-slave\fP, \fIteam-slave\fP and \fIbridge-slave\fP create \fIethernet\fP
447 connection profiles. Their use is discouraged in favor of using a specific type with \fImaster\fP
448 option.
449 .IP "\fIifname <ifname> | \(dq\&*\(dq\&\fP" 42
450 \(en interface to bind the connection to. The connection will only be applicable to this
451 interface name. A special value of "\fB*\fP" can be used for interface-independent connections.
452 The \fIifname\fP argument is mandatory for all connection types except bond, team, bridge and vlan.
453 Note: use quotes around \fB*\fP to suppress shell expansion.
454 .IP "\fI[con-name <connection name>]\fP" 42
455 \(en connection name (when not provided a default name is generated: <type>[-<ifname>][-<num>])
456 .IP "\fI[autoconnect yes|no]\fP" 42
457 \(en whether the connection profile can be automatically activated (default: yes)
458 .IP "\fI[save yes|no]\fP" 42
459 \(en whether the connection should be persistent, i.e. NetworkManager should store it on disk (default: yes)
460 .IP "\fI[master <master (ifname, or connection UUID or name)>]\fP" 42
461 \(en master interface name, or connection UUID or ID of master connection profile.
462 The value can be prefixed with \fBifname/\fP, \fBuuid/\fP or \fBid/\fP to disambiguate it.
463 See below \fBSLAVE_OPTIONS\fP for additional options for slave connection to masters of various types.
464 .IP "\fI[slave-type <master connection type>]\fP" 42
465 \(en type of master connection. Only required when it can not be inferred (i.e. the master connection does
466 not exist yet).
467 .RE
468 .RS
469 .TP
470 .B TYPE_SPECIFIC_OPTIONS:
471 .TP
472 .B ethernet:
473 .IP "\fI[mac <MAC address>]\fP" 42
474 \(en MAC address of the device this connection is locked to
475 .IP "\fI[cloned-mac <cloned MAC address>]\fP" 42
476 \(en cloned MAC
477 .IP "\fI[mtu <MTU>]\fP" 42
478 \(en MTU
479 .RE
480 .RS
481 .TP
482 .B wifi:
483 .IP "\fIssid <SSID>\fP" 42
484 \(en SSID
485 .IP "\fI[mac <MAC address>]\fP" 42
486 \(en MAC address of the device this connection is locked to
487 .IP "\fI[cloned-mac <cloned MAC address>]\fP" 42
488 \(en cloned MAC
489 .IP "\fI[mode infrastructure|ap|adhoc]\fP" 42
490 \(en Wi-Fi network mode. If blank, \fIinfrastructure\fP is assumed.
491 .IP "\fI[mtu <MTU>]\fP" 42
492 \(en MTU
493 .RE
494 .RS
495 .TP
496 .B wimax:
497 .IP "\fI[mac <MAC address>]\fP" 42
498 \(en MAC address of the device this connection is locked to
499 .IP "\fI[nsp <NSP>]\fP" 42
500 \(en Network Service Provider name
501 .RE
502 .RS
503 .TP
504 .B pppoe:
505 .IP "\fIusername <PPPoE username>\fP" 42
506 \(en PPPoE username
507 .IP "\fI[password <PPPoE password>]\fP" 42
508 \(en Password for the PPPoE username
509 .IP "\fI[service <PPPoE service name>]\fP" 42
510 \(en PPPoE service name (if required by concentrator)
511 .IP "\fI[mtu <MTU>]\fP" 42
512 \(en MTU
513 .IP "\fI[mac <MAC address>]\fP" 42
514 \(en MAC address of the device this connection is locked to
515 .RE
516 .RS
517 .TP
518 .B gsm:
519 .IP "\fIapn <APN>\fP" 42
520 \(en APN - GSM Access Point Name
521 .IP "\fI[user <username>]\fP" 42
522 \(en user name
523 .IP "\fI[password <password>]\fP" 42
524 \(en password
525 .RE
526 .RS
527 .TP
528 .B cdma:
529 .IP "\fI[user <username>]\fP" 42
530 \(en user name
531 .IP "\fI[password <password>]\fP" 42
532 \(en password
533 .RE
534 .RS
535 .TP
536 .B infiniband:
537 .IP "\fI[mac <MAC address>]\fP" 42
538 \(en MAC address of the device this connection is locked to (InfiniBand MAC is 20 bytes)
539 .IP "\fI[mtu <MTU>]\fP" 42
540 \(en MTU
541 .IP "\fI[transport-mode datagram | connected]\fP" 42
542 \(en InfiniBand transport mode
543 .IP "\fI[parent <interface name>]\fP" 42
544 \(en the interface name of the parent device (if any)
545 .IP "\fI[p-key <IPoIB P_Key>]\fP" 42
546 \(en the InfiniBand P_Key (16-bit unsigned integer)
547 .RE
548 .RS
549 .TP
550 .B bluetooth:
551 .IP "\fI[addr <bluetooth address>]\fP" 42
552 \(en Bluetooth device address (MAC)
553 .IP "\fI[bt-type panu|dun-gsm|dun-cdma]\fP" 42
554 \(en Bluetooth connection type
555 .RE
556 .RS
557 .TP
558 .B vlan:
559 .IP "\fIdev <parent device (connection UUID, ifname, or MAC)>\fP" 42
560 \(en parent device this VLAN is on
561 .IP "\fIid <VLAN ID>\fP" 42
562 \(en VLAN ID in range <0-4095>
563 .IP "\fI[flags <VLAN flags>]\fP" 42
564 \(en flags
565 .IP "\fI[ingress <ingress priority mapping>]\fP" 42
566 \(en VLAN ingress priority mapping
567 .IP "\fI[egress <egress priority mapping>]\fP" 42
568 \(en VLAN egress priority mapping
569 .IP "\fI[mtu <MTU>]\fP" 42
570 \(en MTU
571 .RE
572 .RS
573 .TP
574 .B bond:
575 .IP "\fI[mode balance-rr (0) | active-backup (1) | balance-xor (2) | broadcast (3) |\fP"
576 .IP "\fI      802.3ad    (4) | balance-tlb   (5) | balance-alb (6)]\fP" 42
577 \(en bonding mode (default: balance-rr)
578 .IP "\fI[primary <ifname>]\fP" 42
579 \(en primary interface name (for "active-backup" mode)
580 .IP "\fI[miimon <num>]\fP" 42
581 \(en miimon (default: 100)
582 .IP "\fI[downdelay <num>]\fP" 42
583 \(en downdelay (default: 0)
584 .IP "\fI[updelay <num>]\fP" 42
585 \(en updelay (default: 0)
586 .IP "\fI[arp-interval <num>]\fP" 42
587 \(en ARP interval (default: 0)
588 .IP "\fI[arp-ip-target <num>]\fP" 42
589 \(en ARP IP target
590 .RE
591 .RS
592 .TP
593 .B bond-slave:
594 .IP "\fImaster <master (ifname, or connection UUID or name)>\fP" 42
595 \(en master bond interface name, or connection UUID or ID of bond master connection profile.
596 The value can be prefixed with \fBifname/\fP, \fBuuid/\fP or \fBid/\fP to disambiguate it.
597 .RE
598 .RS
599 .TP
600 .B team:
601 .IP "\fI[config <file>|<raw JSON data>]\fP" 42
602 \(en JSON configuration for team
603 .RE
604 .RS
605 .TP
606 .B team-slave:
607 .IP "\fImaster <master (ifname, or connection UUID or name)>\fP" 42
608 \(en master team interface name, or connection UUID or ID of team master connection profile.
609 The value can be prefixed with \fBifname/\fP, \fBuuid/\fP or \fBid/\fP to disambiguate it.
610 .RE
611 .RS
612 .TP
613 .B bridge:
614 .IP "\fI[stp yes|no]\fP" 42
615 \(en controls whether Spanning Tree Protocol (STP) is enabled for this bridge (default: yes)
616 .IP "\fI[priority <num>]\fP" 42
617 \(en sets STP priority (default: 128)
618 .IP "\fI[forward-delay <2-30>]\fP" 42
619 \(en STP forwarding delay, in seconds (default: 15)
620 .IP "\fI[hello-time <1-10>]\fP" 42
621 \(en STP hello time, in seconds (default: 2)
622 .IP "\fI[max-age <6-42>]\fP" 42
623 \(en STP maximum message age, in seconds (default: 20)
624 .IP "\fI[ageing-time <0-1000000>]\fP" 42
625 \(en the Ethernet MAC address aging time, in seconds (default: 300)
626 .IP "\fI[multicast-snooping yes|no]\fP" 42
627 \(en controls whether IGMP snooping is enabled (default: yes)
628 .IP "\fI[mac <MAC address>]\fP" 42
629 \(en MAC address of the bridge (note: this requires a recent kernel feature,
630 originally introduced in 3.15 upstream kernel)
631 .RE
632 .RS
633 .TP
634 .B bridge-slave:
635 .IP "\fImaster <master (ifname, or connection UUID or name)>\fP" 42
636 \(en master bridge interface name, or connection UUID or ID of bridge master connection profile.
637 The value can be prefixed with \fBifname/\fP, \fBuuid/\fP or \fBid/\fP to disambiguate it.
638 .RE
639 .RS
640 .TP
641 .B vpn:
642 .IP "\fIvpn-type vpnc|openvpn|pptp|openconnect|openswan|libreswan|strongswan|ssh|l2tp|iodine|fortisslvpn|...\fP" 42
643 \(en VPN type
644 .IP "\fI[user <username>]\fP" 42
645 \(en VPN username
646 .RE
647 .RS
648 .TP
649 .B olpc-mesh:
650 .IP "\fIssid <SSID>\fP" 42
651 \(en SSID
652 .IP "\fI[channel <1-13>]\fP" 42
653 \(en channel to use for the network
654 .IP "\fI[dhcp-anycast <MAC address>]\fP" 42
655 \(en anycast DHCP MAC address used when requesting an IP address via DHCP
656 .RE
657 .RS
658 .TP
659 .B adsl:
660 .IP "\fIusername <username>\fP" 42
661 \(en ADSL user name
662 .IP "\fIprotocol pppoa|pppoe|ipoatm\fP" 42
663 \(en ADSL protocol
664 .IP "\fI[password <password>]\fP" 42
665 \(en ADSL password
666 .IP "\fI[encapsulation vcmux|llc]\fP" 42
667 \(en ADSL encapsulation
668 .RE
669 .RS
670 .TP
671 .B tun:
672 .IP "\fImode tun|tap\fP" 42
673 \(en Mode for the device
674 .IP "\fI[owner <UID>]\fP" 42
675 \(en UID of the owner
676 .IP "\fI[group <GID>]\fP" 42
677 \(en GID of the group
678 .IP "\fI[pi yes|no>]\fP" 42
679 \(en include packet information (~IFF_NO_PI flag)
680 .IP "\fI[vnet-hdr yes|no>]\fP" 42
681 \(en send and receive large (i.e. GSO) packets and packets with partial checksums (IFF_VNET_HDR flag)
682 .IP "\fI[multi-queue yes|no>]\fP" 42
683 \(en multi-queue support for tun/tap device (IFF_MULTI_QUEUE flag)
684 .RE
685 .RS
686 .TP
687 .B ip-tunnel:
688 .IP "\fImode ipip|gre|sit|isatap|vti|ip6ip6|ipip6|ip6gre|vti6\fP" 42
689 \(en tunnel mode
690 .IP "\fIremote <remote endpoint IP>\fP" 42
691 \(en IPv4 or IPv6 address of the remote tunnel endpoint
692 .IP "\fI[local <local endpoint IP>]\fP" 42
693 \(en IPv4 or IPv6 address of the local tunnel endpoint
694 .IP "\fI[dev <parent device (ifname or connection UUID)>]\fP" 42
695 \(en device to use for tunnel endpoint communication
696 .RE
697 .RS
698 .TP
699 .B macvlan:
700 .IP "\fIdev <parent device (connection  UUID, ifname, or MAC)>\fP" 42
701 \(en parent device this MACVLAN is on
702 .IP "\fImode vepa|bridge|private|passthru|source\fP" 42
703 \(en MACVLAN mode, which specifies the communication mechanism between multiple MACVLANs on the same lower device
704 .IP "\fI[tap yes|no]\fP" 42
705 \(en controls the device type. If set to 'yes' a MACVTAP will be created (default: no)
706 .RE
707 .RS
708 .TP
709 .B vxlan:
710 .IP "\fIid <VXLAN ID>\fP" 42
711 \(en VXLAN Network Identifer to use
712 .IP "\fIremote <IP>\fP" 42
713 \(en unicast destination IP address or multicast IP address to join
714 .IP "\fI[dev <parent device (ifname or connection UUID)>]\fP" 42
715 \(en device to use for tunnel endpoint communication
716 .IP "\fI[local <IP>]\fP" 42
717 \(en source IP address
718 .IP "\fI[source-port-min <0-65535>]\fP" 42
719 \(en minimum UDP source port to communicate to the remote VXLAN tunnel endpoint
720 .IP "\fI[source-port-max <0-65535>]\fP" 42
721 \(en maximum UDP source port to communicate to the remote VXLAN tunnel endpoint
722 .IP "\fI[destination-port <0-65535>]\fP" 42
723 \(en UDP destination port to communicate to the remote VXLAN tunnel endpoint
724 .RE
725 .RS
726 .TP
727 .B SLAVE_OPTIONS:
728 .RE
729 .RS
730 .TP
731 .B bridge:
732 .IP "\fI[priority <0-63>]\fP" 42
733 \(en STP priority of this slave (default: 32)
734 .IP "\fI[path-cost <1-65535>]\fP" 42
735 \(en STP port cost for destinations via this slave (default: 100)
736 .IP "\fI[hairpin yes|no]\fP" 42
737 \(en 'hairpin mode' for the slave, which allows frames
738 to be sent back out through the slave the frame was received on (default: yes)
739 .RE
740 .RS
741 .TP
742 .B team:
743 .IP "\fI[config <file>|<raw JSON data>]\fP" 42
744 \(en JSON configuration for team
745 .RE
746 .RS
747 .TP
748 .B IP_OPTIONS:
749 .IP "\fI[ip4 <IPv4 address>] [gw4 <IPv4 gateway>]\fP" 42
750 \(en IPv4 addresses
751 .IP "\fI[ip6 <IPv6 address>] [gw6 <IPv6 gateway>]\fP" 42
752 \(en IPv6 addresses
753 .RE
754 .RS
755 If a \fI--\fP argument is encountered, the rest of command line is interpreted
756 as property list in the same format as \fIconnection modify\fP command accepts.
757 This makes it possible to adjust the connection properties before it's added.
758 .RE
759 .TP
760 .B edit [id | uuid | path ] <ID>  - edit an existing connection
761 .RE
762 .RS
763 .B edit [type <new connection type>] [con-name <new connection name>]  - add a new connection
764 .RS
765 Edit an existing connection or add a new one, using an interactive editor.
766 .br
767 The existing connection is identified by its name, UUID or D-Bus path.
768 If <ID> is ambiguous, a keyword \fIid\fP, \fIuuid\fP, or \fIpath\fP can be used.
769 See \fBconnection show\fP above for the description of the <ID>-specifying keywords.
770 Not providing an <ID> means that a new connection will be added.
771 .sp
772 The interactive editor will guide you through the connection editing and
773 allow you to change connection parameters according to your needs by means of
774 a simple menu-driven interface. The editor indicates what settings and
775 properties can be modified and provides in-line help.
776 .sp
777 .PP
778 Available options:
779 .IP \fItype\fP 13
780 \(en type of the new connection; valid types are the same as for \fIconnection add\fP command
781 .IP \fIcon-name\fP 13
782 \(en name for the new connection. It can be changed later in the editor.
783 .RE
784 .RS
785 .sp
786 See also \fInm-settings\fP(5) for all NetworkManager settings and property names, and their
787 descriptions; and \fInmcli-examples\fP(5) for sample editor sessions.
788 .RE
789 .TP
790 .B modify [--temporary] [ id | uuid | path ] <ID> [+|-]<setting>.<property> <value>
791 .B [+|-]<setting>.<property> <value> ...
792 .br
793 Modify one or more properties in the connection profile.
794 .br
795 The connection is identified by its name, UUID or D-Bus path. If <ID> is
796 ambiguous, a keyword \fIid\fP, \fIuuid\fP or \fIpath\fP can be used.  See
797 \fInm-settings\fP(5) for setting and property names, their descriptions and
798 default values. This command supports abbreviations for \fIsetting name\fP and
799 \fIproperty name\fP provided they are unique. Empty \fIvalue\fP ("") removes
800 the property value (sets the property to the default value).  The provided
801 value overwrites the existing property value.
802 .br
803 If you want to append an item to the existing value, use \fI+\fP prefix for the
804 property name. If you want to remove just one item from container-type
805 property, use \fI-\fP prefix for the property name and specify a value or an
806 zero-based index of the item to remove (or option name for properties with
807 named options) as \fIvalue\fP. Of course, \fI+|-\fP only have a real effect for
808 multi-value (container) properties like ipv4.dns, ipv4.addresses, bond.options,
809 etc.
810 .br
811 The changes to the connection profile will be saved persistently by
812 NetworkManager, unless \fI--temporary\fP option is provided, in which case the
813 changes won't persist over NetworkManager restart.
814 .TP
815 .B clone [--temporary] [ id | uuid | path ] <ID> <new name>
816 .br
817 Clone a connection. The connection to be cloned is identified by its
818 name, UUID or D-Bus path. If <ID> is ambiguous, a keyword \fIid\fP,
819 \fIuuid\fP or \fIpath\fP can be used. See \fBconnection show\fP above for
820 the description of the <ID>-specifying keywords. \fI<new name>\fP is the name
821 of the new cloned connection. The new connection will be the exact copy except
822 the connection.id (\fI<new name>\fP) and connection.uuid (generated)
823 properties.
824 .br
825 The new connection profile will be saved as persistent unless \fI--temporary\fP
826 option is specified, in which case the new profile won't exist after NetworkManager
827 restart.
828 .TP
829 .B delete [ id | uuid | path ] <ID> ...
830 .br
831 Delete a configured connection. The connection to be deleted is identified by
832 its name, UUID or D-Bus path. If <ID> is ambiguous, a keyword \fIid\fP,
833 \fIuuid\fP or \fIpath\fP can be used.
834 .br
835 See \fBconnection show\fP above for the description of the <ID>-specifying keywords.
836 .br
837 If '--wait' option is not specified, the default timeout will be 10 seconds.
838 .TP
839 .B monitor [ id | uuid | path ] <ID> ...
840 .br
841 Monitor connection profile activity. This command prints a line whenever the
842 specified connection changes. The connection to be monitored is identified by
843 its name, UUID or D-Bus path. If <ID> is ambiguous, a keyword \fIid\fP,
844 \fIuuid\fP or \fIpath\fP can be used.
845 .br
846 See \fBconnection show\fP above for the description of the <ID>-specifying keywords.
847 .br
848 Monitors all connection profiles in case none is specified. The command terminates
849 when all monitored connections disappear. If you want to monitor connection creation
850 consider using the global monitor with \fInmcli monitor\fP command.
851 .TP
852 .B reload
853 .br
854 Reload all connection files from disk. \fINetworkManager\fP does not monitor
855 changes to connection files by default. So you need to use this command in order
856 to tell \fINetworkManager\fP to re-read the connection profiles from disk when
857 a change was made to them. However, the auto-loading feature can be enabled and
858 then \fINetworkManager\fP will reload connection files any time they change
859 (monitor-connection-files=true in \fINetworkManager.conf\fP(5)).
860 .TP
861 .B load <filename> [<filename>...]
862 .br
863 Load/reload one or more connection files from disk. Use this after manually
864 editing a connection file to ensure that \fBNetworkManager\fP is aware
865 of its latest state.
866 .TP
867 .B import [--temporary] type <type> file <file to import>
868 .br
869 Import an external/foreign configuration as a NetworkManager connection profile.
870 The type of the input file is specified by \fItype\fP option.
871 .br
872 Only VPN configurations are supported at the moment. The configuration
873 is imported by NetworkManager VPN plugins. \fItype\fP values are the same as for
874 \fIvpn-type\fP option in \fBnmcli connection add\fP. VPN configurations are
875 imported by VPN plugins. Therefore the proper VPN plugin has to be installed
876 so that nmcli could import the data.
877 .br
878 The imported connection profile will be saved as persistent unless \fI--temporary\fP
879 option is specified, in which case the new profile won't exist after NetworkManager
880 restart.
881 .TP
882 .B export [ id | uuid | path ] <ID> [<output file>]
883 .br
884 Export a connection.
885 .br
886 Only VPN connections are supported at the moment. A proper VPN plugin has to be
887 installed so that nmcli could export a connection. If no \fI<output file>\fP is
888 provided, the VPN configuration data will be printed to standard output.
889 .RE
890
891 .TP
892 .B device - show and manage network interfaces
893 .br
894 .TP
895 .SS \fICOMMAND\fP := { status | show | set | connect | reapply | disconnect | delete | monitor | wifi | lldp }
896 .sp
897 .RS
898 .TP
899 .B status
900 .br
901 Print status of devices.
902 .br
903 This is the default action if no command is specified to \fIdevice\fP object.
904 .TP
905 .B show [<ifname>]
906 .br
907 Show detailed information about devices.  Without an argument, all devices are
908 examined. To get information for a specific device, the interface name has
909 to be provided.
910 .TP
911 .TP
912 .B set [ifname] <ifname> [autoconnect yes|no] [managed yes|no]
913 .br
914 Set device properties.
915 .TP
916 .B connect <ifname>
917 .br
918 Connect the device. NetworkManager will try to find a suitable connection that
919 will be activated. It will also consider connections that are not set to auto connect.
920 .br
921 If '--wait' option is not specified, the default timeout will be 90 seconds.
922 .TP
923 .B reapply <ifname>
924 .br
925 Attempt to update device with changes to the currently active connection
926 made since it was last applied.
927 .TP
928 .B disconnect <ifname> ...
929 .br
930 Disconnect a device and prevent the device from automatically activating further
931 connections without user/manual intervention. Note that disconnecting software
932 devices may mean that the devices will disappear.
933 .br
934 If '--wait' option is not specified, the default timeout will be 10 seconds.
935 .TP
936 .B delete <ifname> ...
937 .br
938 Delete a device. The command removes the interface from the system. Note that
939 this only works for software devices like bonds, bridges, teams, etc.
940 Hardware devices (like Ethernet) cannot be deleted by the command.
941 .br
942 If '--wait' option is not specified, the default timeout will be 10 seconds.
943 .TP
944 .B monitor [<ifname>] ...
945 .br
946 Monitor device activity. This command prints a line whenever the specified devices
947 change state.
948 .br
949 Monitors all devices in case no interface is specified. The monitor terminates when
950 all specified devices disappear. If you want to monitor device addition consider
951 using the global monitor with \fInmcli monitor\fP command.
952 .TP
953 .B wifi [list [ifname <ifname>] [bssid <BSSID>]]
954 .br
955 List available Wi\(hyFi access points. The \fIifname\fP and \fIbssid\fP options
956 can be used to list APs for a particular interface or with a specific BSSID,
957 respectively.
958 .TP
959 .B wifi connect <(B)SSID> [password <password>] [wep\-key\-type key|phrase] [ifname <ifname>] [bssid <BSSID>] [name <name>]
960 .B [private yes|no] [hidden yes|no]
961 .br
962 Connect to a Wi\(hyFi network specified by SSID or BSSID. The command creates a new
963 connection and then activates it on a device. This is a command\(hyline counterpart
964 of clicking an SSID in a GUI client. The command always creates a new connection
965 and thus it is mainly useful for connecting to new Wi\(hyFi networks. If a connection
966 for the network already exists, it is better to bring up (activate) the existing connection
967 as follows: \fInmcli con up id <name>\fP. Note that only open, WEP and WPA\(hyPSK networks
968 are supported at the moment. It is also supposed that IP configuration is obtained via
969 DHCP.
970 .br
971 If '--wait' option is not specified, the default timeout will be 90 seconds.
972 .RS
973 .PP
974 Available options are:
975 .IP \fIpassword\fP 13
976 \(en password for secured networks (WEP or WPA)
977 .IP \fIwep\-key\-type\fP 13
978 \(en type of WEP secret, either \fIkey\fP for ASCII/HEX key or \fIphrase\fP for passphrase
979 .IP \fIifname\fP 13
980 \(en interface that will be used for activation
981 .IP \fIbssid\fP 13
982 \(en if specified, the created connection will be restricted just for the BSSID
983 .IP \fIname\fP 13
984 \(en if specified, the connection will use the name (else NM creates a name itself)
985 .IP \fIprivate\fP 13
986 \(en if set to \fByes\fP, the connection will only be visible to the user who created it.
987 Otherwise the connection is system\(hywide, which is the default.
988 .IP \fIhidden\fP 13
989 \(en set to \fByes\fP when connecting for the first time to an AP not broadcasting its SSID.
990 Otherwise the SSID would not be found and the connection attempt would fail.
991 .RE
992 .TP
993 .B wifi hotspot [ifname <ifname>] [con-name <name>] [ssid <SSID>] [band a|bg] [channel <channel>] [password <password>]
994 .br
995 Create a Wi-Fi hotspot. The command creates a hotspot connection profile according to
996 Wi-Fi device capabilities and activates it on the device. The hotspot is secured with WPA
997 if device/driver supports that, otherwise WEP is used.
998 Use \fIconnection down\fP or \fIdevice disconnect\fP to stop the hotspot.
999 .br
1000 .RS
1001 .PP
1002 Parameters of the hotspot can be influenced by the optional parameters:
1003 .IP \fIifname\fP 17
1004 \(en what Wi-Fi device is used
1005 .IP \fIcon-name\fP 17
1006 \(en name of the created hotspot connection profile
1007 .IP \fIssid\fP 17
1008 \(en SSID of the hotspot
1009 .IP \fIband\fP 17
1010 \(en Wi-Fi band to use
1011 .IP \fIchannel\fP 17
1012 \(en Wi-Fi channel to use
1013 .IP \fIpassword\fP 17
1014 \(en password to use for the created hotspot. If not provided,
1015 nmcli will generate a password. The password is either WPA
1016 pre-shared key or WEP key.
1017 .PP
1018 Note that \fI--show-secrets\fP global option can be used to print the hotspot
1019 password. It is useful especially when the password was generated.
1020 .RE
1021 .TP
1022 .B wifi rescan [ifname <ifname>] [[ssid <SSID>] ...]
1023 .br
1024 Request that \fINetworkManager\fP immediately re-scan for available access points.
1025 NetworkManager scans Wi\(hyFi networks periodically, but in some cases it can be
1026 useful to start scanning manually (e.g. after resuming the computer). By using
1027 \fIssid\fP, it is possible to scan for a specific SSID, which is useful for APs
1028 with hidden SSIDs. You can provide multiple \fIssid\fP parameters in order to
1029 scan more SSIDs.
1030 .br
1031 This command does not show the APs, use 'nmcli device wifi list' for that.
1032 .TP
1033 .B lldp [list [ifname <ifname>]]
1034 .br
1035 Display information about neighboring devices learned through the Link
1036 Layer Discovery Protocol (LLDP). The \fIifname\fP option can be used to
1037 list neighbors only for a given interface. The protocol must be
1038 enabled in the connection settings.
1039 .RE
1040
1041 .TP
1042 .B agent \- run nmcli as a NetworkManager secret agent, or polkit agent
1043 .br
1044 .TP
1045 .SS \fICOMMAND\fP := { secret | polkit  | all }
1046 .sp
1047 .RS
1048 .TP
1049 .B secret
1050 .br
1051 Register nmcli as a NetworkManager secret agent and listen for secret requests.
1052 You do usually not need this command, because nmcli can handle secrets when
1053 connecting to networks. However, you may find the command useful when you use
1054 another tool for activating connections and you do not have a secret agent
1055 available (like nm-applet).
1056 .TP
1057 .B polkit
1058 .br
1059 Register nmcli as a polkit agent for the user session and listen for
1060 authorization requests. You do not usually need this command, because nmcli can
1061 handle polkit actions related to NetworkManager operations (when run with
1062 --ask).  However, you may find the command useful when you want to run a simple
1063 text based polkit agent and you do not have an agent of a desktop environment.
1064 Note that running this command makes nmcli handle all polkit requests, not only
1065 NetworkManager related ones, because only one polkit agent can run for the
1066 session.
1067 .TP
1068 .B all
1069 .br
1070 Runs nmcli as both NetworkManager secret and a polkit agent.
1071 .RE
1072
1073 .SH ENVIRONMENT VARIABLES
1074 \fInmcli\fP's behavior is affected by the following environment variables.
1075 .IP "LC_ALL" 13
1076 If set to a non\(hyempty string value, it overrides the values of all the other
1077 internationalization variables.
1078 .IP "LC_MESSAGES" 13
1079 Determines the locale to be used for internationalized messages.
1080 .IP "LANG" 13
1081 Provides a default value for the internationalization variables that are unset
1082 or null.
1083
1084 .RE
1085 Internationalization notes:
1086 .br
1087 Be aware that \fInmcli\fP is localized and that is why the output depends on
1088 your environment. This is important to realize especially when you parse the
1089 output.
1090 .br
1091 Call \fInmcli\fP as \fBLC_ALL=C nmcli\fP to be sure the locale is
1092 set to "C" while executing in a script.
1093
1094 \fBLC_ALL\fP, \fBLC_MESSAGES\fP, \fBLANG\fP variables specify the LC_MESSAGES
1095 locale category (in that order), which determines the language that \fInmcli\fP
1096 uses for messages.  The "C" locale is used if none of these variables are set,
1097 and this locale uses English messages.
1098
1099 .SH EXIT STATUS
1100 \fInmcli\fP exits with status 0 if it succeeds, a value greater than 0 is
1101 returned if an error occurs.
1102 .IP "0" 4
1103 Success \(en indicates the operation succeeded
1104 .IP "1" 4
1105 Unknown or unspecified error
1106 .IP "2" 4
1107 Invalid user input, wrong \fInmcli\fP invocation
1108 .IP "3" 4
1109 Timeout expired (see \fI\-\-wait\fP option)
1110 .IP "4" 4
1111 Connection activation failed
1112 .IP "5" 4
1113 Connection deactivation failed
1114 .IP "6" 4
1115 Disconnecting device failed
1116 .IP "7" 4
1117 Connection deletion failed
1118 .IP "8" 4
1119 NetworkManager is not running
1120 .IP "9" 4
1121 \fInmcli\fP and \fINetworkManager\fP versions mismatch
1122 .IP "10" 4
1123 Connection, device, or access point does not exist.
1124
1125 .SH EXAMPLES
1126 .PP
1127 This section presents various examples of nmcli usage. If you want even more,
1128 please refer to \fInmcli-examples\fP(5) manual page.
1129 .sp
1130 .IP "\fB\f(CWnmcli \-t \-f RUNNING general\fP\fP"
1131 .IP
1132 tells you whether NetworkManager is running or not.
1133
1134 .IP "\fB\f(CWnmcli \-t \-f STATE general\fP\fP"
1135 .IP
1136 shows the overall status of NetworkManager.
1137
1138 .IP "\fB\f(CWnmcli radio wifi off\fP\fP"
1139 .IP
1140 switches Wi\(hyFi off.
1141
1142 .IP "\fB\f(CWnmcli connection show\fP\fP"
1143 .IP
1144 lists all connections NetworkManager has.
1145
1146 .IP "\fB\f(CWnmcli \-p \-m multiline \-f all con show\fP\fP"
1147 .IP
1148 shows all configured connections in multi-line mode.
1149
1150 .IP "\fB\f(CWnmcli connection show --active\fP\fP"
1151 .IP
1152 lists all currently active connections.
1153
1154 .IP "\fB\f(CWnmcli \-f name,autoconnect c s\fP\fP"
1155 .IP
1156 shows all connection profile names and their auto-connect property.
1157
1158 .IP "\fB\f(CWnmcli \-p connection show \(dq\&My default em1\(dq\&\fP\fP"
1159 .IP
1160 shows details for "My default em1" connection profile.
1161
1162 .IP "\fB\f(CWnmcli --show-secrets connection show \(dq\&My Home WiFi\(dq\&\fP\fP"
1163 .IP
1164 shows details for "My Home WiFi" connection profile with all passwords.
1165 Without \fI--show-secrets\fP option, secrets would not be displayed.
1166
1167 .IP "\fB\f(CWnmcli \-f active connection show \(dq\&My default em1\(dq\&\fP\fP"
1168 .IP
1169 shows details for "My default em1" active connection, like IP, DHCP
1170 information, etc.
1171
1172 .IP "\fB\f(CWnmcli -f profile con s \(dq\&My wired connection\(dq\&\fP\fP"
1173 .IP
1174 shows static configuration details of the connection profile with "My wired connection" name.
1175
1176 .IP "\fB\f(CWnmcli \-p con up \(dq\&My wired connection\(dq\& ifname eth0\fP\fP"
1177 .IP
1178 activates the connection profile with name "My wired connection" on interface eth0.
1179 The \-p option makes nmcli show progress of the activation.
1180
1181 .IP "\fB\f(CWnmcli con up 6b028a27\-6dc9\-4411\-9886\-e9ad1dd43761 ap 00:3A:98:7C:42:D3\fP\fP"
1182 .IP
1183 connects the Wi\(hyFi connection with UUID 6b028a27\-6dc9\-4411\-9886\-e9ad1dd43761 to the AP
1184 with BSSID 00:3A:98:7C:42:D3.
1185
1186 .IP "\fB\f(CWnmcli device status\fP\fP"
1187 .IP
1188 shows the status for all devices.
1189
1190 .IP "\fB\f(CWnmcli dev disconnect em2\fP\fP"
1191 .IP
1192 disconnects a connection on interface em2 and marks the device as unavailable for
1193 auto\(hyconnecting. As a result, no connection will automatically be activated on the
1194 device until the device's 'autoconnect' is set to TRUE or the user manually activates
1195 a connection.
1196
1197 .IP "\fB\f(CWnmcli \-f GENERAL,WIFI\-PROPERTIES dev show wlan0\fP\fP"
1198 .IP
1199 shows details for wlan0 interface; only GENERAL and WIFI\-PROPERTIES sections will be shown.
1200
1201 .IP "\fB\f(CWnmcli \-f CONNECTIONS device show wlp3s0\fP\fP"
1202 .IP
1203 shows all available connection profiles for your Wi-Fi interface wlp3s0.
1204
1205 .IP "\fB\f(CWnmcli dev wifi\fP\fP"
1206 .IP
1207 lists available Wi\(hyFi access points known to NetworkManager.
1208
1209 .IP "\fB\f(CWnmcli dev wifi con \(dq\&Cafe Hotspot 1\(dq\& password caffeine name \(dq\&My cafe\(dq\&\fP\fP"
1210 .IP
1211 creates a new connection named "My cafe" and then connects it to "Cafe Hotspot 1" SSID
1212 using password "caffeine". This is mainly useful when connecting to "Cafe Hotspot 1" for
1213 the first time. Next time, it is better to use 'nmcli con up id "My cafe"' so that the
1214 existing connection profile can be used and no additional is created.
1215
1216 .IP "\fB\f(CWnmcli -s dev wifi hotspot con-name QuickHotspot\fP\fP"
1217 .IP
1218 creates a hotspot profile and connects it. Prints the hotspot password the user should use
1219 to connect to the hotspot from other devices.
1220
1221 .IP "\fB\f(CWnmcli connection add type ethernet autoconnect no ifname eth0\fP\fP"
1222 .IP
1223 non-interactively adds an Ethernet connection tied to eth0 interface with automatic IP configuration (DHCP),
1224 and disables the connection's "autoconnect" flag.
1225
1226 .IP "\fB\f(CWnmcli c a ifname Maxipes\(hyfik type vlan dev eth0 id 55\fP\fP"
1227 .IP
1228 non-interactively adds a VLAN connection with ID 55. The connection will use eth0 and the VLAN interface
1229 will be named Maxipes\(hyfik.
1230
1231 .IP "\fB\f(CWnmcli c a ifname eth0 type ethernet -- ipv4.method disabled ipv6.method link-local\fP\fP"
1232 .IP
1233 non-interactively adds a connection that will use eth0 Ethernet interface and only have an IPv6 link-local
1234 address configured.
1235
1236 .IP "\fB\f(CWnmcli connection edit ethernet\-em1\-2\fP\fP"
1237 .IP
1238 edits existing "ethernet\(hyem1\(hy2" connection in the interactive editor.
1239
1240 .IP "\fB\f(CWnmcli connection edit type ethernet con-name \(dq\&yet another Ethernet connection\(dq\&\fP\fP"
1241 .IP
1242 adds a new Ethernet connection in the interactive editor.
1243
1244 .IP "\fB\f(CWnmcli con mod ethernet\-2 connection.autoconnect no\fP\fP"
1245 .IP
1246 modifies 'autoconnect' property in the 'connection' setting of 'ethernet\(hy2' connection.
1247
1248 .IP "\fB\f(CWnmcli con mod \(dq\&Home Wi\-Fi\(dq\& wifi.mtu 1350\fP\fP"
1249 .IP
1250 modifies 'mtu' property in the 'wifi' setting of 'Home Wi\(hyFi' connection.
1251
1252 .IP "\fB\f(CWnmcli con mod em1-1 ipv4.method manual ipv4.addr \(dq\&192.168.1.23/24 192.168.1.1, 10.10.1.5/8, 10.0.0.11\(dq\&\fP\fP"
1253 .IP
1254 sets manual addressing and the addresses in em1-1 profile.
1255
1256 .IP "\fB\f(CWnmcli con modify ABC +ipv4.dns 8.8.8.8\fP\fP"
1257 .IP
1258 appends a Google public DNS server to DNS servers in ABC profile.
1259
1260 .IP "\fB\f(CWnmcli con modify ABC -ipv4.addresses \(dq\&192.168.100.25/24 192.168.1.1\(dq\&\fP\fP"
1261 .IP
1262 removes the specified IP address from (static) profile ABC.
1263
1264 .IP "\fB\f(CWnmcli con import type openvpn file ~/Downloads/frootvpn.ovpn\fP\fP"
1265 .IP
1266 imports an OpenVPN configuration to NetworkManager.
1267
1268 .IP "\fB\f(CWnmcli con export corp-vpnc /home/joe/corpvpn.conf\fP\fP"
1269 .IP
1270 exports NetworkManager VPN profile corp-vpnc as standard Cisco (vpnc) configuration.
1271
1272 .SH NOTES
1273 \fInmcli\fP accepts abbreviations, as long as they are a unique prefix in the set
1274 of possible options. As new options get added, these abbreviations are not guaranteed
1275 to stay unique. For scripting and long term compatibility it is therefore strongly
1276 advised to spell out the full option names.
1277
1278 .SH BUGS
1279 There are probably some bugs.  If you find a bug, please report it to
1280 https://bugzilla.gnome.org/ \(em product \fINetworkManager\fP.
1281
1282 .SH SEE ALSO
1283 .BR nmcli\-examples (5),
1284 .BR nm\-online (1),
1285 .BR NetworkManager (8),
1286 .BR NetworkManager.conf (5),
1287 .BR nm\-settings (5),
1288 .BR nm\-applet (1),
1289 .BR nm\-connection\-editor (1).