| 1 |
<?xml version='1.0'?> |
| 2 |
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?> |
| 3 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 4 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
| 5 |
<!ENTITY % entities SYSTEM "common.ent" > |
| 6 |
%entities; |
| 7 |
]> |
| 8 |
|
| 9 |
<!-- |
| 10 |
SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 11 |
|
| 12 |
nmcli(1) manual page |
| 13 |
|
| 14 |
Copyright 2010 - 2022 Red Hat, Inc. |
| 15 |
--> |
| 16 |
|
| 17 |
<refentry id='nmcli'> |
| 18 |
|
| 19 |
<refentryinfo> |
| 20 |
<title>nmcli</title> |
| 21 |
<author>NetworkManager developers</author> |
| 22 |
</refentryinfo> |
| 23 |
|
| 24 |
<refmeta> |
| 25 |
<refentrytitle>nmcli</refentrytitle> |
| 26 |
<manvolnum>1</manvolnum> |
| 27 |
<refmiscinfo class="source">NetworkManager</refmiscinfo> |
| 28 |
<refmiscinfo class="manual">General Commands Manual</refmiscinfo> |
| 29 |
<refmiscinfo class="version">&NM_VERSION;</refmiscinfo> |
| 30 |
</refmeta> |
| 31 |
|
| 32 |
<refnamediv> |
| 33 |
<refname>nmcli</refname> |
| 34 |
<refpurpose>command-line tool for controlling NetworkManager</refpurpose> |
| 35 |
</refnamediv> |
| 36 |
|
| 37 |
<refsynopsisdiv id='synopsis'> |
| 38 |
<cmdsynopsis> |
| 39 |
<command>nmcli</command> |
| 40 |
<arg choice="opt" rep="repeat"><replaceable>OPTIONS</replaceable></arg> |
| 41 |
<group choice='req'> |
| 42 |
<arg choice='plain'><option>help</option></arg> |
| 43 |
<arg choice='plain'><option>general</option></arg> |
| 44 |
<arg choice='plain'><option>networking</option></arg> |
| 45 |
<arg choice='plain'><option>radio</option></arg> |
| 46 |
<arg choice='plain'><option>connection</option></arg> |
| 47 |
<arg choice='plain'><option>device</option></arg> |
| 48 |
<arg choice='plain'><option>agent</option></arg> |
| 49 |
<arg choice='plain'><option>monitor</option></arg> |
| 50 |
</group> |
| 51 |
<arg><replaceable>COMMAND</replaceable></arg> |
| 52 |
<arg rep="repeat"><replaceable>ARGUMENTS</replaceable></arg> |
| 53 |
</cmdsynopsis> |
| 54 |
</refsynopsisdiv> |
| 55 |
|
| 56 |
<refsect1 id='description'><title>Description</title> |
| 57 |
<para><command>nmcli</command> is a command-line tool for controlling |
| 58 |
NetworkManager and reporting network status. It can be utilized as a |
| 59 |
replacement for <command>nm-applet</command> or other graphical clients. |
| 60 |
<command>nmcli</command> is used to create, display, edit, delete, activate, |
| 61 |
and deactivate network connections, as well as control and display network |
| 62 |
device status. See |
| 63 |
<link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link> |
| 64 |
for ready to run nmcli examples.</para> |
| 65 |
|
| 66 |
<para>Typical uses include:</para> |
| 67 |
<itemizedlist> |
| 68 |
<listitem> |
| 69 |
<para>Scripts: Utilize NetworkManager via <command>nmcli</command> instead of |
| 70 |
managing network connections manually. <command>nmcli</command> supports a |
| 71 |
terse output format which is better suited for script processing. Note that |
| 72 |
NetworkManager can also execute scripts, called "dispatcher scripts", in |
| 73 |
response to network events. See |
| 74 |
<link linkend='NetworkManager'><link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link></link> |
| 75 |
for details about these dispatcher scripts.</para> |
| 76 |
</listitem> |
| 77 |
|
| 78 |
<listitem> |
| 79 |
<para>Servers, headless machines, and terminals: <command>nmcli</command> can |
| 80 |
be used to control NetworkManager without a GUI, including creating, editing, |
| 81 |
starting and stopping network connections and viewing network status.</para> |
| 82 |
</listitem> |
| 83 |
</itemizedlist> |
| 84 |
</refsect1> |
| 85 |
|
| 86 |
<refsect1 id='options'><title>Options</title> |
| 87 |
<variablelist> |
| 88 |
|
| 89 |
<varlistentry> |
| 90 |
<term><group choice='plain'> |
| 91 |
<arg choice='plain'><option>-a</option></arg> |
| 92 |
<arg choice='plain'><option>--ask</option></arg> |
| 93 |
</group></term> |
| 94 |
|
| 95 |
<listitem> |
| 96 |
<para>When using this option <command>nmcli</command> will stop and ask for any |
| 97 |
missing required arguments, so do not use this option for non-interactive |
| 98 |
purposes like scripts. This option controls, for example, whether you will be |
| 99 |
prompted for a password if it is required for connecting to a network.</para> |
| 100 |
</listitem> |
| 101 |
</varlistentry> |
| 102 |
|
| 103 |
<varlistentry> |
| 104 |
<term><group choice='plain'> |
| 105 |
<arg choice='plain'><option>-c</option></arg> |
| 106 |
<arg choice='plain'><option>--colors</option></arg> |
| 107 |
<group choice='req'> |
| 108 |
<arg choice='plain'>yes</arg> |
| 109 |
<arg choice='plain'>no</arg> |
| 110 |
<arg choice='plain'>auto</arg> |
| 111 |
</group> |
| 112 |
</group></term> |
| 113 |
|
| 114 |
<listitem> |
| 115 |
<para>This option controls color output (using terminal escape sequences). |
| 116 |
<literal>yes</literal> enables colors, <literal>no</literal> disables them, |
| 117 |
<literal>auto</literal> only produces colors when standard output is directed |
| 118 |
to a terminal. The default value is <literal>auto</literal>.</para> |
| 119 |
<para>The actual colors used are configured as described in |
| 120 |
<citerefentry><refentrytitle>terminal-colors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 121 |
Please refer to the <link linkend='colors' endterm='colors.title' /> section for a |
| 122 |
list of color names supported by <command>nmcli</command>.</para> |
| 123 |
<para>If the environment variable <literal>NO_COLOR</literal> is set (to any non-empty value), |
| 124 |
then coloring is disabled with mode "auto". If the environment variable <literal>CLICOLOR_FORCE</literal> |
| 125 |
is set (to any non-empty value), then coloring is enabled with mode "auto". Explicitly enabling coloring overrides |
| 126 |
the environment variable.</para> |
| 127 |
</listitem> |
| 128 |
</varlistentry> |
| 129 |
|
| 130 |
<varlistentry> |
| 131 |
<term><group choice='plain'> |
| 132 |
<arg choice='plain'><option>--complete-args</option></arg> |
| 133 |
</group></term> |
| 134 |
|
| 135 |
<listitem> |
| 136 |
<para>Instead of conducting the desired action, <command>nmcli</command> |
| 137 |
will list possible completions for the last argument. This is useful to implement |
| 138 |
argument completion in shell.</para> |
| 139 |
|
| 140 |
<para>The <link linkend='exit_status'>exit status</link> will indicate success |
| 141 |
or return a code 65 to indicate the last argument is a file name.</para> |
| 142 |
|
| 143 |
<para>NetworkManager ships with command completion support for GNU Bash.</para> |
| 144 |
</listitem> |
| 145 |
</varlistentry> |
| 146 |
|
| 147 |
<varlistentry> |
| 148 |
<term><group choice='plain'> |
| 149 |
<arg choice='plain'><option>-e</option></arg> |
| 150 |
<arg choice='plain'><option>--escape</option></arg> |
| 151 |
<group choice='req'> |
| 152 |
<arg choice='plain'>yes</arg> |
| 153 |
<arg choice='plain'>no</arg> |
| 154 |
</group> |
| 155 |
</group></term> |
| 156 |
|
| 157 |
<listitem> |
| 158 |
<para>Whether to escape <literal>:</literal> and <literal>\</literal> characters in terse tabular mode. The |
| 159 |
escape character is <literal>\</literal>.</para> |
| 160 |
|
| 161 |
<para>If omitted, default is <literal>yes</literal>.</para> |
| 162 |
</listitem> |
| 163 |
</varlistentry> |
| 164 |
|
| 165 |
<varlistentry> |
| 166 |
<term><group choice='plain'> |
| 167 |
<arg choice='plain'><option>-f</option></arg> |
| 168 |
<arg choice='plain'><option>--fields</option></arg> |
| 169 |
<group choice='req'> |
| 170 |
<arg choice='plain' rep='repeat'><replaceable>field1</replaceable>,<replaceable>field2</replaceable></arg> |
| 171 |
<arg choice='plain'>all</arg> |
| 172 |
<arg choice='plain'>common</arg> |
| 173 |
</group> |
| 174 |
</group></term> |
| 175 |
|
| 176 |
<listitem> |
| 177 |
<para>This option is used to specify what fields (column names) should be |
| 178 |
printed. Valid field names differ for specific commands. List available fields |
| 179 |
by providing an invalid value to the <option>--fields</option> option. |
| 180 |
<literal>all</literal> is used to print all valid field values of the |
| 181 |
command. <literal>common</literal> is used to print common field values of |
| 182 |
the command.</para> |
| 183 |
|
| 184 |
<para>If omitted, default is <literal>common</literal>.</para> |
| 185 |
</listitem> |
| 186 |
</varlistentry> |
| 187 |
|
| 188 |
<varlistentry> |
| 189 |
<term><group choice='plain'> |
| 190 |
<arg choice='plain'><option>-g</option></arg> |
| 191 |
<arg choice='plain'><option>--get-values</option></arg> |
| 192 |
<group choice='req'> |
| 193 |
<arg choice='plain' rep='repeat'><replaceable>field1</replaceable>,<replaceable>field2</replaceable></arg> |
| 194 |
<arg choice='plain'>all</arg> |
| 195 |
<arg choice='plain'>common</arg> |
| 196 |
</group> |
| 197 |
</group></term> |
| 198 |
|
| 199 |
<listitem> |
| 200 |
<para>This option is used to print values from specific fields. It is basically |
| 201 |
a shortcut for <literal>--mode tabular --terse --fields</literal> and is a convenient |
| 202 |
way to retrieve values for particular fields. The values are printed one per line |
| 203 |
without headers.</para> |
| 204 |
|
| 205 |
<para>If a section is specified instead of a field, the section name will be printed |
| 206 |
followed by colon separated values of the fields belonging to that section, all on |
| 207 |
the same line.</para> |
| 208 |
</listitem> |
| 209 |
</varlistentry> |
| 210 |
|
| 211 |
<varlistentry> |
| 212 |
<term><group choice='plain'> |
| 213 |
<arg choice='plain'><option>-h</option></arg> |
| 214 |
<arg choice='plain'><option>--help</option></arg> |
| 215 |
</group></term> |
| 216 |
|
| 217 |
<listitem> |
| 218 |
<para>Print help information.</para> |
| 219 |
</listitem> |
| 220 |
</varlistentry> |
| 221 |
|
| 222 |
<varlistentry> |
| 223 |
<term><group choice='plain'> |
| 224 |
<arg choice='plain'><option>-m</option></arg> |
| 225 |
<arg choice='plain'><option>--mode</option></arg> |
| 226 |
<group choice='req'> |
| 227 |
<arg choice='plain'>tabular</arg> |
| 228 |
<arg choice='plain'>multiline</arg> |
| 229 |
</group> |
| 230 |
</group></term> |
| 231 |
|
| 232 |
<listitem> |
| 233 |
<para>Switch between tabular and multiline output:</para> |
| 234 |
|
| 235 |
<variablelist> |
| 236 |
<varlistentry> |
| 237 |
<term><arg choice='plain'>tabular</arg></term> |
| 238 |
<listitem> |
| 239 |
<para>Output is a table where each line describes a single entry. |
| 240 |
Columns define particular properties of the entry.</para> |
| 241 |
</listitem> |
| 242 |
</varlistentry> |
| 243 |
|
| 244 |
<varlistentry> |
| 245 |
<term><arg choice='plain'>multiline</arg></term> |
| 246 |
<listitem> |
| 247 |
<para>Each entry comprises multiple lines, each property on its |
| 248 |
own line. The values are prefixed with the property name.</para> |
| 249 |
</listitem> |
| 250 |
</varlistentry> |
| 251 |
</variablelist> |
| 252 |
|
| 253 |
<para>If omitted, default is <literal>tabular</literal> for most commands. |
| 254 |
For the commands producing more structured information, that cannot be |
| 255 |
displayed on a single line, default is <literal>multiline</literal>. |
| 256 |
Currently, they are:</para> |
| 257 |
|
| 258 |
<itemizedlist> |
| 259 |
<listitem> |
| 260 |
<para><literal>nmcli connection show <replaceable>ID</replaceable></literal></para> |
| 261 |
</listitem> |
| 262 |
|
| 263 |
<listitem> |
| 264 |
<para><literal>nmcli device show</literal></para> |
| 265 |
</listitem> |
| 266 |
</itemizedlist> |
| 267 |
|
| 268 |
</listitem> |
| 269 |
</varlistentry> |
| 270 |
|
| 271 |
<varlistentry> |
| 272 |
<term><group choice='plain'> |
| 273 |
<arg choice='plain'><option>-p</option></arg> |
| 274 |
<arg choice='plain'><option>--pretty</option></arg> |
| 275 |
</group></term> |
| 276 |
|
| 277 |
<listitem> |
| 278 |
<para>Output is pretty. This causes <command>nmcli</command> to produce easily |
| 279 |
readable outputs for humans, i.e. values are aligned, headers are printed, |
| 280 |
etc.</para> |
| 281 |
</listitem> |
| 282 |
</varlistentry> |
| 283 |
|
| 284 |
<varlistentry> |
| 285 |
<term><group choice='plain'> |
| 286 |
<arg choice='plain'><option>-s</option></arg> |
| 287 |
<arg choice='plain'><option>--show-secrets</option></arg> |
| 288 |
</group></term> |
| 289 |
|
| 290 |
<listitem> |
| 291 |
<para>When using this option <command>nmcli</command> will display passwords |
| 292 |
and secrets that might be present in an output of an operation. This option |
| 293 |
also influences echoing passwords typed by user as an input.</para> |
| 294 |
</listitem> |
| 295 |
</varlistentry> |
| 296 |
|
| 297 |
<varlistentry> |
| 298 |
<term><group choice='plain'> |
| 299 |
<arg choice='plain'><option>-t</option></arg> |
| 300 |
<arg choice='plain'><option>--terse</option></arg> |
| 301 |
</group></term> |
| 302 |
|
| 303 |
<listitem> |
| 304 |
<para>Output is terse. This mode is designed and suitable for computer (script) |
| 305 |
processing.</para> |
| 306 |
</listitem> |
| 307 |
</varlistentry> |
| 308 |
|
| 309 |
<varlistentry> |
| 310 |
<term><group choice='plain'> |
| 311 |
<arg choice='plain'><option>--offline</option></arg> |
| 312 |
</group></term> |
| 313 |
|
| 314 |
<listitem> |
| 315 |
<para>Work without a daemon. Makes <command>connection add</command> and |
| 316 |
<command>connection modify</command> commands accept and produce connection |
| 317 |
data via standard input/output. Ordinarily, nmcli would communicate with |
| 318 |
the NetworkManager service.</para> |
| 319 |
|
| 320 |
<para>The connection data format (keyfile) is described in |
| 321 |
<citerefentry><refentrytitle>nm-settings-keyfile</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 322 |
manual.</para> |
| 323 |
</listitem> |
| 324 |
</varlistentry> |
| 325 |
|
| 326 |
<varlistentry> |
| 327 |
<term><group choice='plain'> |
| 328 |
<arg choice='plain'><option>-v</option></arg> |
| 329 |
<arg choice='plain'><option>--version</option></arg> |
| 330 |
</group></term> |
| 331 |
|
| 332 |
<listitem> |
| 333 |
<para>Show <command>nmcli</command> version.</para> |
| 334 |
</listitem> |
| 335 |
</varlistentry> |
| 336 |
|
| 337 |
<varlistentry> |
| 338 |
<term><group choice='plain'> |
| 339 |
<arg choice='plain'><option>-w</option></arg> |
| 340 |
<arg choice='plain'><option>--wait</option></arg></group> |
| 341 |
<arg choice='plain'><replaceable>seconds</replaceable></arg> |
| 342 |
</term> |
| 343 |
|
| 344 |
<listitem> |
| 345 |
<para>This option sets a timeout period for which <command>nmcli</command> will |
| 346 |
wait for NetworkManager to finish operations. It is |
| 347 |
especially useful for commands that may take a longer time to complete, e.g. |
| 348 |
connection activation.</para> |
| 349 |
|
| 350 |
<para>Specifying a value of <literal>0</literal> instructs |
| 351 |
<command>nmcli</command> not to wait but to exit immediately with a status of |
| 352 |
success. The default value depends on the executed command.</para> |
| 353 |
</listitem> |
| 354 |
</varlistentry> |
| 355 |
|
| 356 |
</variablelist> |
| 357 |
</refsect1> |
| 358 |
|
| 359 |
<refsect1 id='general'><title>General Commands</title> |
| 360 |
|
| 361 |
<cmdsynopsis> |
| 362 |
<command>nmcli general</command> |
| 363 |
<group choice='req'> |
| 364 |
<arg choice='plain'><command>status</command></arg> |
| 365 |
<arg choice='plain'><command>hostname</command></arg> |
| 366 |
<arg choice='plain'><command>permissions</command></arg> |
| 367 |
<arg choice='plain'><command>logging</command></arg> |
| 368 |
<arg choice='plain'><command>reload</command></arg> |
| 369 |
</group> |
| 370 |
<arg rep='repeat'><replaceable>ARGUMENTS</replaceable></arg> |
| 371 |
</cmdsynopsis> |
| 372 |
|
| 373 |
<para>Use this command to show NetworkManager status and permissions. You can also get |
| 374 |
and change system hostname, as well as NetworkManager logging level and domains.</para> |
| 375 |
|
| 376 |
<variablelist> |
| 377 |
|
| 378 |
<varlistentry> |
| 379 |
<term><command>status</command></term> |
| 380 |
|
| 381 |
<listitem> |
| 382 |
<para>Show overall status of NetworkManager. This is the default action, when |
| 383 |
no additional command is provided for <command>nmcli general</command>.</para> |
| 384 |
</listitem> |
| 385 |
</varlistentry> |
| 386 |
|
| 387 |
<varlistentry> |
| 388 |
<term> |
| 389 |
<command>hostname</command> |
| 390 |
<arg><replaceable>hostname</replaceable></arg> |
| 391 |
</term> |
| 392 |
|
| 393 |
<listitem> |
| 394 |
<para>Get and change system hostname. With no arguments, this prints currently |
| 395 |
configured hostname. When you pass a hostname, it will be handed over to |
| 396 |
NetworkManager to be set as a new system hostname.</para> |
| 397 |
|
| 398 |
<para>Note that the term "system" hostname may also be referred to as |
| 399 |
"persistent" or "static" by other programs or tools. The hostname is stored |
| 400 |
in <filename>/etc/hostname</filename> file in most distributions. For example, |
| 401 |
systemd-hostnamed service uses the term "static" hostname and it only reads |
| 402 |
the <filename>/etc/hostname</filename> file when it starts.</para> |
| 403 |
</listitem> |
| 404 |
</varlistentry> |
| 405 |
|
| 406 |
<varlistentry> |
| 407 |
<term><command>permissions</command></term> |
| 408 |
|
| 409 |
<listitem> |
| 410 |
<para>Show the permissions a caller has for various authenticated operations |
| 411 |
that NetworkManager provides, like enable and disable networking, changing |
| 412 |
Wi-Fi and WWAN state, modifying connections, etc.</para> |
| 413 |
</listitem> |
| 414 |
</varlistentry> |
| 415 |
|
| 416 |
<varlistentry> |
| 417 |
<term> |
| 418 |
<command>logging</command> |
| 419 |
<arg><option>level</option> <replaceable>level</replaceable></arg> |
| 420 |
<arg rep='repeat'><option>domains</option> <replaceable>domains</replaceable></arg> |
| 421 |
</term> |
| 422 |
|
| 423 |
<listitem> |
| 424 |
<para>Get and change NetworkManager logging level and |
| 425 |
domains. Without any argument current logging level and domains are shown. In |
| 426 |
order to change logging state, provide <option>level</option> and, or, |
| 427 |
<option>domain</option> parameters. See |
| 428 |
<link linkend='NetworkManager.conf'><link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link></link> |
| 429 |
for available level and domain values.</para> |
| 430 |
</listitem> |
| 431 |
</varlistentry> |
| 432 |
|
| 433 |
<varlistentry> |
| 434 |
<term> |
| 435 |
<command>reload</command> |
| 436 |
<arg rep='repeat'><replaceable>flags</replaceable></arg> |
| 437 |
</term> |
| 438 |
|
| 439 |
<listitem> |
| 440 |
<para> |
| 441 |
Reload NetworkManager's configuration and perform certain |
| 442 |
updates, like flushing caches or rewriting external state to |
| 443 |
disk. This is similar to sending SIGHUP to NetworkManager |
| 444 |
but it allows for more fine-grained control over what to |
| 445 |
reload through the flags argument. It also allows non-root |
| 446 |
access via PolicyKit and contrary to signals it is |
| 447 |
synchronous. Available flags are: |
| 448 |
</para> |
| 449 |
<variablelist> |
| 450 |
<varlistentry> |
| 451 |
<term><option>conf</option></term> |
| 452 |
<listitem><para> |
| 453 |
Reload the NetworkManager.conf configuration from |
| 454 |
disk. Note that this does not include connections, which |
| 455 |
can be reloaded through <command>nmcli connection |
| 456 |
reload</command> instead. |
| 457 |
</para></listitem> |
| 458 |
</varlistentry> |
| 459 |
|
| 460 |
<varlistentry> |
| 461 |
<term><option>dns-rc</option></term> |
| 462 |
<listitem><para> |
| 463 |
Update DNS configuration, which usually involves writing |
| 464 |
/etc/resolv.conf anew. This is equivalent to sending the |
| 465 |
SIGUSR1 signal to the NetworkManager process. |
| 466 |
</para></listitem> |
| 467 |
</varlistentry> |
| 468 |
|
| 469 |
<varlistentry> |
| 470 |
<term><option>dns-full</option></term> |
| 471 |
<listitem><para> |
| 472 |
Restart the DNS plugin. This is for example useful when |
| 473 |
using dnsmasq plugin, which uses additional |
| 474 |
configuration in |
| 475 |
<filename>/etc/NetworkManager/dnsmasq.d</filename>. If |
| 476 |
you edit those files, you can restart the DNS |
| 477 |
plugin. This action shortly interrupts name resolution. |
| 478 |
</para></listitem> |
| 479 |
</varlistentry> |
| 480 |
</variablelist> |
| 481 |
<para> |
| 482 |
With no flags, everything that is supported is reloaded, |
| 483 |
which is identical to sending a SIGHUP. See |
| 484 |
<citerefentry> |
| 485 |
<refentrytitle>NetworkManager</refentrytitle> |
| 486 |
<manvolnum>8</manvolnum> |
| 487 |
</citerefentry> |
| 488 |
for more details about signals. |
| 489 |
</para> |
| 490 |
</listitem> |
| 491 |
</varlistentry> |
| 492 |
</variablelist> |
| 493 |
</refsect1> |
| 494 |
|
| 495 |
<refsect1 id='networking'><title>Networking Control Commands</title> |
| 496 |
|
| 497 |
<cmdsynopsis> |
| 498 |
<command>nmcli networking</command> |
| 499 |
<group choice='req'> |
| 500 |
<arg choice='plain'><command>on</command></arg> |
| 501 |
<arg choice='plain'><command>off</command></arg> |
| 502 |
<arg choice='plain'><command>connectivity</command></arg> |
| 503 |
</group> |
| 504 |
<arg rep='repeat'><replaceable>ARGUMENTS</replaceable></arg> |
| 505 |
</cmdsynopsis> |
| 506 |
|
| 507 |
<para>Query NetworkManager networking status, enable and disable networking. |
| 508 |
</para> |
| 509 |
|
| 510 |
<variablelist> |
| 511 |
|
| 512 |
<varlistentry> |
| 513 |
<term><command>on</command></term> |
| 514 |
<term><command>off</command></term> |
| 515 |
|
| 516 |
<listitem> |
| 517 |
<para>Enable or disable networking control by NetworkManager. |
| 518 |
All interfaces managed by NetworkManager are deactivated when networking |
| 519 |
is disabled.</para> |
| 520 |
</listitem> |
| 521 |
</varlistentry> |
| 522 |
|
| 523 |
<varlistentry> |
| 524 |
<term> |
| 525 |
<command>connectivity</command> |
| 526 |
<arg>check</arg> |
| 527 |
</term> |
| 528 |
|
| 529 |
<listitem> |
| 530 |
<para>Get network connectivity state. The optional <option>check</option> |
| 531 |
argument tells NetworkManager to re-check the connectivity, else the most |
| 532 |
recent known connectivity state is displayed without re-checking.</para> |
| 533 |
|
| 534 |
<para>Possible states are:</para> |
| 535 |
|
| 536 |
<variablelist> |
| 537 |
<varlistentry> |
| 538 |
<term><arg choice='plain'>none</arg></term> |
| 539 |
<listitem> |
| 540 |
<para>the host is not connected to any network.</para> |
| 541 |
</listitem> |
| 542 |
</varlistentry> |
| 543 |
<varlistentry> |
| 544 |
<term><arg choice='plain'>portal</arg></term> |
| 545 |
<listitem> |
| 546 |
<para>the host is behind a captive portal and cannot reach the full Internet.</para> |
| 547 |
</listitem> |
| 548 |
</varlistentry> |
| 549 |
<varlistentry> |
| 550 |
<term><arg choice='plain'>limited</arg></term> |
| 551 |
<listitem> |
| 552 |
<para>the host is connected to a network, but it has no access to the Internet.</para> |
| 553 |
</listitem> |
| 554 |
</varlistentry> |
| 555 |
<varlistentry> |
| 556 |
<term><arg choice='plain'>full</arg></term> |
| 557 |
<listitem> |
| 558 |
<para>the host is connected to a network and has full access to the Internet.</para> |
| 559 |
</listitem> |
| 560 |
</varlistentry> |
| 561 |
<varlistentry> |
| 562 |
<term><arg choice='plain'>unknown</arg></term> |
| 563 |
<listitem> |
| 564 |
<para>the connectivity status cannot be found out.</para> |
| 565 |
</listitem> |
| 566 |
</varlistentry> |
| 567 |
</variablelist> |
| 568 |
</listitem> |
| 569 |
</varlistentry> |
| 570 |
|
| 571 |
</variablelist> |
| 572 |
</refsect1> |
| 573 |
|
| 574 |
<refsect1 id='radio'><title>Radio Transmission Control Commands</title> |
| 575 |
|
| 576 |
<cmdsynopsis> |
| 577 |
<command>nmcli radio</command> |
| 578 |
<group choice='req'> |
| 579 |
<arg choice='plain'><command>all</command></arg> |
| 580 |
<arg choice='plain'><command>wifi</command></arg> |
| 581 |
<arg choice='plain'><command>wwan</command></arg> |
| 582 |
</group> |
| 583 |
<arg rep='repeat'><replaceable>ARGUMENTS</replaceable></arg> |
| 584 |
</cmdsynopsis> |
| 585 |
|
| 586 |
<para>Show radio switches status, or enable and disable the switches.</para> |
| 587 |
|
| 588 |
<variablelist> |
| 589 |
|
| 590 |
<varlistentry> |
| 591 |
<term> |
| 592 |
<command>wifi</command> |
| 593 |
<group> |
| 594 |
<arg choice='plain'>on</arg> |
| 595 |
<arg choice='plain'>off</arg> |
| 596 |
</group> |
| 597 |
</term> |
| 598 |
|
| 599 |
<listitem> |
| 600 |
<para>Show or set status of Wi-Fi in NetworkManager. If no arguments are |
| 601 |
supplied, Wi-Fi status is printed; <option>on</option> enables Wi-Fi; |
| 602 |
<option>off</option> disables Wi-Fi.</para> |
| 603 |
</listitem> |
| 604 |
</varlistentry> |
| 605 |
|
| 606 |
<varlistentry> |
| 607 |
<term> |
| 608 |
<command>wwan</command> |
| 609 |
<group> |
| 610 |
<arg choice='plain'>on</arg> |
| 611 |
<arg choice='plain'>off</arg> |
| 612 |
</group> |
| 613 |
</term> |
| 614 |
|
| 615 |
<listitem> |
| 616 |
<para>Show or set status of WWAN (mobile broadband) in NetworkManager. If no |
| 617 |
arguments are supplied, mobile broadband status is printed; |
| 618 |
<option>on</option> enables mobile broadband, <option>off</option> |
| 619 |
disables it.</para> |
| 620 |
</listitem> |
| 621 |
</varlistentry> |
| 622 |
|
| 623 |
<varlistentry> |
| 624 |
<term> |
| 625 |
<command>all</command> |
| 626 |
<group> |
| 627 |
<arg choice='plain'>on</arg> |
| 628 |
<arg choice='plain'>off</arg> |
| 629 |
</group> |
| 630 |
</term> |
| 631 |
|
| 632 |
<listitem> |
| 633 |
<para>Show or set all previously mentioned radio switches at the same time.</para> |
| 634 |
</listitem> |
| 635 |
</varlistentry> |
| 636 |
</variablelist> |
| 637 |
</refsect1> |
| 638 |
|
| 639 |
<refsect1 id='monitor'><title>Activity Monitor</title> |
| 640 |
|
| 641 |
<cmdsynopsis> |
| 642 |
<command>nmcli monitor</command> |
| 643 |
</cmdsynopsis> |
| 644 |
|
| 645 |
<para>Observe NetworkManager activity. Watches for changes |
| 646 |
in connectivity state, devices or connection profiles.</para> |
| 647 |
|
| 648 |
<para>See also <command>nmcli connection monitor</command> |
| 649 |
and <command>nmcli device monitor</command> to watch |
| 650 |
for changes in certain devices or connections.</para> |
| 651 |
</refsect1> |
| 652 |
|
| 653 |
<refsect1 id='connection'><title>Connection Management Commands</title> |
| 654 |
|
| 655 |
<cmdsynopsis> |
| 656 |
<command>nmcli connection</command> |
| 657 |
<group choice='req'> |
| 658 |
<arg choice='plain'><command>show</command></arg> |
| 659 |
<arg choice='plain'><command>up</command></arg> |
| 660 |
<arg choice='plain'><command>down</command></arg> |
| 661 |
<arg choice='plain'><command>modify</command></arg> |
| 662 |
<arg choice='plain'><command>add</command></arg> |
| 663 |
<arg choice='plain'><command>edit</command></arg> |
| 664 |
<arg choice='plain'><command>clone</command></arg> |
| 665 |
<arg choice='plain'><command>delete</command></arg> |
| 666 |
<arg choice='plain'><command>monitor</command></arg> |
| 667 |
<arg choice='plain'><command>reload</command></arg> |
| 668 |
<arg choice='plain'><command>load</command></arg> |
| 669 |
<arg choice='plain'><command>import</command></arg> |
| 670 |
<arg choice='plain'><command>export</command></arg> |
| 671 |
<arg choice='plain'><command>migrate</command></arg> |
| 672 |
</group> |
| 673 |
<arg rep='repeat'><replaceable>ARGUMENTS</replaceable></arg> |
| 674 |
</cmdsynopsis> |
| 675 |
|
| 676 |
<para>NetworkManager stores all network configuration as "connections", |
| 677 |
which are collections of data (Layer2 details, IP addressing, etc.) that |
| 678 |
describe how to create or connect to a network. A connection is "active" |
| 679 |
when a device uses that connection's configuration to create or connect to |
| 680 |
a network. There may be multiple connections that apply to a device, but only |
| 681 |
one of them can be active on that device at any given time. The additional |
| 682 |
connections can be used to allow quick switching between different networks |
| 683 |
and configurations.</para> |
| 684 |
|
| 685 |
<para>Consider a machine which is usually connected to a DHCP-enabled network, |
| 686 |
but sometimes connected to a testing network which uses static IP addressing. |
| 687 |
Instead of manually reconfiguring eth0 each time the network is changed, the |
| 688 |
settings can be saved as two connections which both apply to eth0, one for DHCP |
| 689 |
(called <literal>default</literal>) and one with the static addressing details (called |
| 690 |
<literal>testing</literal>). When connected to the DHCP-enabled network the user would run |
| 691 |
<command>nmcli con up default</command> , and when connected to the static network the user |
| 692 |
would run <command>nmcli con up testing</command>.</para> |
| 693 |
|
| 694 |
<variablelist> |
| 695 |
|
| 696 |
<varlistentry> |
| 697 |
<term> |
| 698 |
<command>show</command> |
| 699 |
<arg><option>--active</option></arg> |
| 700 |
<arg> |
| 701 |
<option>--order</option> |
| 702 |
<arg choice='plain' rep='repeat'>[+-]<replaceable>category</replaceable>:</arg> |
| 703 |
</arg> |
| 704 |
</term> |
| 705 |
|
| 706 |
<listitem> |
| 707 |
<para>List in-memory and on-disk connection profiles, some of which may also be |
| 708 |
active if a device is using that connection profile. Without a parameter, all |
| 709 |
profiles are listed. When <option>--active</option> option is specified, only |
| 710 |
the active profiles are shown.</para> |
| 711 |
|
| 712 |
<para>The <option>--order</option> option can be used to get custom |
| 713 |
ordering of connections. The connections can be ordered by active status |
| 714 |
(<literal>active</literal>), name (<literal>name</literal>), type |
| 715 |
(<literal>type</literal>) or D-Bus path (<literal>path</literal>). If |
| 716 |
connections are equal according to a sort order category, an additional |
| 717 |
category can be specified. The default sorting order is equivalent to |
| 718 |
<literal>--order active:name:path</literal>. <literal>+</literal> or no |
| 719 |
prefix means sorting in ascending order (alphabetically or in numbers), |
| 720 |
<literal>-</literal> means reverse (descending) order. The category names |
| 721 |
can be abbreviated (e.g. <literal>--order -a:na</literal>).</para> |
| 722 |
</listitem> |
| 723 |
</varlistentry> |
| 724 |
|
| 725 |
<varlistentry> |
| 726 |
<term> |
| 727 |
<command>show</command> |
| 728 |
<arg><option>--active</option></arg> |
| 729 |
<group> |
| 730 |
<arg choice='plain'><option>id</option></arg> |
| 731 |
<arg choice='plain'><option>uuid</option></arg> |
| 732 |
<arg choice='plain'><option>path</option></arg> |
| 733 |
<arg choice='plain'><option>apath</option></arg> |
| 734 |
</group> |
| 735 |
<arg rep='repeat' choice='plain'><replaceable>ID</replaceable></arg> |
| 736 |
</term> |
| 737 |
|
| 738 |
<listitem> |
| 739 |
<para>Show details for specified connections. By default, both static |
| 740 |
configuration and active connection data are displayed. When |
| 741 |
<option>--active</option> option is specified, only the active profiles are |
| 742 |
taken into account. Use global <option>--show-secrets</option> option to |
| 743 |
display secrets associated with the profile.</para> |
| 744 |
|
| 745 |
<para><option>id</option>, <option>uuid</option>, |
| 746 |
<option>path</option> and <option>apath</option> keywords can be used |
| 747 |
if <replaceable>ID</replaceable> is ambiguous. Optional |
| 748 |
<replaceable>ID</replaceable>-specifying keywords are:</para> |
| 749 |
|
| 750 |
<variablelist> |
| 751 |
<varlistentry> |
| 752 |
<term><option>id</option></term> |
| 753 |
<listitem> |
| 754 |
<para>the <replaceable>ID</replaceable> denotes a connection name.</para> |
| 755 |
</listitem> |
| 756 |
</varlistentry> |
| 757 |
<varlistentry> |
| 758 |
<term><option>uuid</option></term> |
| 759 |
<listitem> |
| 760 |
<para>the <replaceable>ID</replaceable> denotes a connection UUID.</para> |
| 761 |
</listitem> |
| 762 |
</varlistentry> |
| 763 |
<varlistentry> |
| 764 |
<term><option>path</option></term> |
| 765 |
<listitem> |
| 766 |
<para>the <replaceable>ID</replaceable> denotes a D-Bus |
| 767 |
static connection path in the format of |
| 768 |
/org/freedesktop/NetworkManager/Settings/<replaceable>num</replaceable> |
| 769 |
or just <replaceable>num</replaceable>.</para> |
| 770 |
</listitem> |
| 771 |
</varlistentry> |
| 772 |
<varlistentry> |
| 773 |
<term><option>apath</option></term> |
| 774 |
<listitem> |
| 775 |
<para>the <replaceable>ID</replaceable> denotes a D-Bus active connection path in the format of |
| 776 |
/org/freedesktop/NetworkManager/ActiveConnection/<replaceable>num</replaceable> or just |
| 777 |
<replaceable>num</replaceable>.</para> |
| 778 |
</listitem> |
| 779 |
</varlistentry> |
| 780 |
</variablelist> |
| 781 |
|
| 782 |
<para>It is possible to filter the output using the global |
| 783 |
<option>--fields</option> option. Use the following values:</para> |
| 784 |
|
| 785 |
<variablelist> |
| 786 |
<varlistentry> |
| 787 |
<term><option>profile</option></term> |
| 788 |
<listitem> |
| 789 |
<para>only shows static profile configuration.</para> |
| 790 |
</listitem> |
| 791 |
</varlistentry> |
| 792 |
<varlistentry> |
| 793 |
<term><option>active</option></term> |
| 794 |
<listitem> |
| 795 |
<para>only shows active connection data (when the profile is active).</para> |
| 796 |
</listitem> |
| 797 |
</varlistentry> |
| 798 |
</variablelist> |
| 799 |
|
| 800 |
<para>You can also specify particular fields. For static configuration, use |
| 801 |
setting and property names as described in |
| 802 |
<citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum> |
| 803 |
</citerefentry> manual page. For active data use GENERAL, IP4, DHCP4, IP6, |
| 804 |
DHCP6, VPN.</para> |
| 805 |
|
| 806 |
<para>When no command is given to the <command>nmcli connection</command>, |
| 807 |
the default action is <command>nmcli connection show</command>.</para> |
| 808 |
|
| 809 |
</listitem> |
| 810 |
</varlistentry> |
| 811 |
|
| 812 |
<varlistentry> |
| 813 |
<term> |
| 814 |
<command>up</command> |
| 815 |
<group> |
| 816 |
<arg choice='plain'><option>id</option></arg> |
| 817 |
<arg choice='plain'><option>uuid</option></arg> |
| 818 |
<arg choice='plain'><option>path</option></arg> |
| 819 |
</group> |
| 820 |
<arg choice='plain'><replaceable>ID</replaceable></arg> |
| 821 |
<arg><option>ifname</option> <replaceable>ifname</replaceable></arg> |
| 822 |
<arg><option>ap</option> <replaceable>BSSID</replaceable></arg> |
| 823 |
<arg><option>passwd-file</option> <replaceable>file</replaceable></arg> |
| 824 |
</term> |
| 825 |
|
| 826 |
<listitem> |
| 827 |
<para>Activate a connection. The connection is identified by its name, UUID or |
| 828 |
D-Bus path. If <replaceable>ID</replaceable> is ambiguous, a keyword <option>id</option>, |
| 829 |
<option>uuid</option> or <option>path</option> can be used. When |
| 830 |
requiring a particular device to activate the connection on, the |
| 831 |
<option>ifname</option> option with interface name should be given. If the |
| 832 |
<replaceable>ID</replaceable> is not given an <option>ifname</option> is required, and |
| 833 |
NetworkManager will activate the best available connection for the given |
| 834 |
<option>ifname</option>. In case of a VPN connection, the |
| 835 |
<option>ifname</option> option specifies the device of the base connection. |
| 836 |
The <option>ap</option> option specify what particular AP should be used in |
| 837 |
case of a Wi-Fi connection.</para> |
| 838 |
|
| 839 |
<para>If <option>--wait</option> option is not specified, the default timeout will be 90 |
| 840 |
seconds.</para> |
| 841 |
|
| 842 |
<para>See <command>connection show</command> above for the description of the |
| 843 |
<replaceable>ID</replaceable>-specifying keywords.</para> |
| 844 |
|
| 845 |
<para>Available options are:</para> |
| 846 |
|
| 847 |
<variablelist> |
| 848 |
<varlistentry> |
| 849 |
<term><option>ifname</option></term> |
| 850 |
<listitem> |
| 851 |
<para>interface that will be used for activation.</para> |
| 852 |
</listitem> |
| 853 |
</varlistentry> |
| 854 |
<varlistentry> |
| 855 |
<term><option>ap</option></term> |
| 856 |
<listitem> |
| 857 |
<para>BSSID of the AP which the command should connect to (for Wi-Fi connections).</para> |
| 858 |
</listitem> |
| 859 |
</varlistentry> |
| 860 |
<varlistentry> |
| 861 |
<term><option>passwd-file</option></term> |
| 862 |
<listitem> |
| 863 |
<para>some networks may require credentials during activation. You can give |
| 864 |
these credentials using this option. Each line of the file should contain one |
| 865 |
password in the form: |
| 866 |
|
| 867 |
<programlisting>setting_name.property_name:the password</programlisting> |
| 868 |
|
| 869 |
For example, for WPA Wi-Fi with PSK, the line would be |
| 870 |
|
| 871 |
<programlisting>802-11-wireless-security.psk:secret12345</programlisting> |
| 872 |
|
| 873 |
For 802.1X password, the line would be |
| 874 |
|
| 875 |
<programlisting>802-1x.password:my 1X password</programlisting> |
| 876 |
|
| 877 |
<command>nmcli</command> also accepts <literal>wifi-sec</literal> and <literal>wifi</literal> strings instead of |
| 878 |
<literal>802-11-wireless-security</literal>. When NetworkManager requires a password and it is |
| 879 |
not given, <command>nmcli</command> will ask for it when run with <option>--ask</option>. |
| 880 |
If <option>--ask</option> was not passed, NetworkManager can ask another secret |
| 881 |
agent that may be running (typically a GUI secret agent, such as nm-applet or |
| 882 |
gnome-shell).</para> |
| 883 |
</listitem> |
| 884 |
</varlistentry> |
| 885 |
</variablelist> |
| 886 |
|
| 887 |
</listitem> |
| 888 |
</varlistentry> |
| 889 |
|
| 890 |
<varlistentry> |
| 891 |
<term> |
| 892 |
<command>down</command> |
| 893 |
<group> |
| 894 |
<arg choice='plain'><option>id</option></arg> |
| 895 |
<arg choice='plain'><option>uuid</option></arg> |
| 896 |
<arg choice='plain'><option>path</option></arg> |
| 897 |
<arg choice='plain'><option>apath</option></arg> |
| 898 |
</group> |
| 899 |
<arg rep='repeat' choice='plain'><replaceable>ID</replaceable></arg> |
| 900 |
</term> |
| 901 |
|
| 902 |
<listitem> |
| 903 |
<para>Deactivate a connection from a device without preventing the device from |
| 904 |
further auto-activation. Multiple connections can be passed to the |
| 905 |
command.</para> |
| 906 |
|
| 907 |
<para>Be aware that this command deactivates the specified active connection, |
| 908 |
but the device on which the connection was active, is still ready to connect |
| 909 |
and will perform auto-activation by looking for a suitable connection that has |
| 910 |
the 'autoconnect' flag set. Note that the deactivating connection profile is |
| 911 |
internally blocked from autoconnecting again. Hence it will not autoconnect |
| 912 |
until reboot or until the user performs an action that unblocks autoconnect, |
| 913 |
like modifying the profile or explicitly activating it.</para> |
| 914 |
|
| 915 |
<para>In most cases you may want to use <command>device down</command> |
| 916 |
command instead.</para> |
| 917 |
|
| 918 |
<para>The connection is identified by its name, UUID or D-Bus path. If |
| 919 |
<replaceable>ID</replaceable> is ambiguous, a keyword <option>id</option>, |
| 920 |
<option>uuid</option>, <option>path</option> or |
| 921 |
<option>apath</option> can be used.</para> |
| 922 |
|
| 923 |
<para>See <command>connection show</command> above for the description of |
| 924 |
the <replaceable>ID</replaceable>-specifying keywords.</para> |
| 925 |
|
| 926 |
<para>If <option>--wait</option> option is not specified, the default timeout |
| 927 |
will be 10 seconds.</para> |
| 928 |
</listitem> |
| 929 |
</varlistentry> |
| 930 |
|
| 931 |
<varlistentry> |
| 932 |
<term> |
| 933 |
<command>modify</command> |
| 934 |
<arg><option>--temporary</option></arg> |
| 935 |
<group> |
| 936 |
<arg choice='plain'><option>id</option></arg> |
| 937 |
<arg choice='plain'><option>uuid</option></arg> |
| 938 |
<arg choice='plain'><option>path</option></arg> |
| 939 |
</group> |
| 940 |
<arg><replaceable>ID</replaceable></arg> |
| 941 |
<arg rep='repeat' choice='plain'> |
| 942 |
<group choice='req'> |
| 943 |
<arg choice='plain'><replaceable>option</replaceable> <replaceable>value</replaceable></arg> |
| 944 |
<arg choice='plain'>[+|-]<replaceable>setting</replaceable>.<replaceable>property</replaceable> <replaceable>value</replaceable></arg> |
| 945 |
</group> |
| 946 |
</arg> |
| 947 |
</term> |
| 948 |
|
| 949 |
<listitem> |
| 950 |
<para>Add, modify or remove properties in the connection profile.</para> |
| 951 |
|
| 952 |
<para>To set the property just specify the property name followed by the |
| 953 |
value. An empty value (<literal>""</literal>) resets the property value to |
| 954 |
the default.</para> |
| 955 |
|
| 956 |
<para>See <citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum> |
| 957 |
</citerefentry> for complete reference of setting and property names, their descriptions |
| 958 |
and default values. The <replaceable>setting</replaceable> and |
| 959 |
<replaceable>property</replaceable> can be abbreviated provided they are unique.</para> |
| 960 |
|
| 961 |
<para>If you want to append an item or a flag to the existing value, use |
| 962 |
<literal>+</literal> prefix for the property name or alias. If you want to |
| 963 |
remove items from a container-type or flag property, use <literal>-</literal> prefix. |
| 964 |
For certain properties you can also remove elements by specifying the zero-based |
| 965 |
index(es). |
| 966 |
The <literal>+</literal> and <literal>-</literal> modifiers |
| 967 |
only have a real effect for properties that support them. |
| 968 |
These are for example multi-value (container) properties or flags like <literal>ipv4.dns</literal>, |
| 969 |
<literal>ip4</literal>, <literal>ipv4.addresses</literal>, <literal>bond.options</literal>, |
| 970 |
<literal>802-1x.phase1-auth-flags</literal> etc.</para> |
| 971 |
|
| 972 |
<para>The connection is identified by its name, UUID or D-Bus path. If |
| 973 |
<replaceable>ID</replaceable> is ambiguous, a keyword <option>id</option>, |
| 974 |
<option>uuid</option> or <option>path</option> can be used. |
| 975 |
The <replaceable>ID</replaceable> is not used with the global |
| 976 |
<option>--offline</option> option.</para> |
| 977 |
|
| 978 |
<para>When the global <option>--offline</option> is used, the |
| 979 |
command reads the connection from the standard input and prints the |
| 980 |
modified connection to standard output instead of making the |
| 981 |
the NetworkManager daemon act upon specified connection.</para> |
| 982 |
</listitem> |
| 983 |
</varlistentry> |
| 984 |
|
| 985 |
<varlistentry> |
| 986 |
<term> |
| 987 |
<command>modify</command> |
| 988 |
<arg><option>--temporary</option></arg> |
| 989 |
<group> |
| 990 |
<arg choice='plain'><option>id</option></arg> |
| 991 |
<arg choice='plain'><option>uuid</option></arg> |
| 992 |
<arg choice='plain'><option>path</option></arg> |
| 993 |
</group> |
| 994 |
<arg choice='plain'><replaceable>ID</replaceable></arg> |
| 995 |
<arg choice='plain'><option>remove</option> <replaceable>setting</replaceable></arg> |
| 996 |
</term> |
| 997 |
|
| 998 |
<listitem> |
| 999 |
<para>Removes a setting from the connection profile.</para> |
| 1000 |
</listitem> |
| 1001 |
</varlistentry> |
| 1002 |
|
| 1003 |
<varlistentry> |
| 1004 |
<term> |
| 1005 |
<command>add</command> |
| 1006 |
<arg><option>save</option><group choice='req'><arg choice='plain'>yes</arg><arg choice='plain'>no</arg></group></arg> |
| 1007 |
<arg rep='repeat' choice='plain'> |
| 1008 |
<group choice='req'> |
| 1009 |
<arg choice='plain'><replaceable>option</replaceable> <replaceable>value</replaceable></arg> |
| 1010 |
<arg choice='plain'>[+|-]<replaceable>setting</replaceable>.<replaceable>property</replaceable> <replaceable>value</replaceable></arg> |
| 1011 |
</group> |
| 1012 |
</arg> |
| 1013 |
</term> |
| 1014 |
|
| 1015 |
<listitem> |
| 1016 |
<para>Create a new connection using specified properties.</para> |
| 1017 |
|
| 1018 |
<para>You need to describe the newly created connections with the property and value pairs. |
| 1019 |
See <citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum> |
| 1020 |
</citerefentry> for the complete reference. The syntax is |
| 1021 |
the same as of the <command>nmcli connection modify</command> command.</para> |
| 1022 |
|
| 1023 |
<para>To construct a meaningful connection you at the very least need to set the |
| 1024 |
<option>connection.type</option> property (or use the <option>type</option> alias) |
| 1025 |
to one of known NetworkManager connection types:</para> |
| 1026 |
|
| 1027 |
<!-- |
| 1028 |
See also: nm_meta_setting_info_get_base_type_priority(). |
| 1029 |
|
| 1030 |
nmcli '-'-complete-args connection add type "" | |
| 1031 |
sort | |
| 1032 |
awk ' |
| 1033 |
/^(bond|bridge|team)-slave$/ { |
| 1034 |
printf " <listitem><para><literal>%s</literal> (deprecated for ethernet with controller)</para></listitem>\n", $0; |
| 1035 |
next; |
| 1036 |
} |
| 1037 |
/^(wifi|ethernet|olpc-mash)$/ { |
| 1038 |
next; |
| 1039 |
} |
| 1040 |
{ |
| 1041 |
alias = ""; |
| 1042 |
if ($0 == "802-11-wireless") { alias = "wifi"; } |
| 1043 |
if ($0 == "802-3-ethernet") { alias = "ethernet"; } |
| 1044 |
if ($0 == "802-11-olpc-mesh") { alias = "olpc-mesh"; } |
| 1045 |
if (alias != "") { |
| 1046 |
printf " <listitem><para><literal>%s</literal> (alias <literal>%s</literal>)</para></listitem>\n", $0, alias; |
| 1047 |
} else { |
| 1048 |
printf " <listitem><para><literal>%s</literal></para></listitem>\n", $0; |
| 1049 |
} |
| 1050 |
} |
| 1051 |
' |
| 1052 |
|
| 1053 |
--> |
| 1054 |
<itemizedlist spacing='compact'> |
| 1055 |
<listitem><para><literal>6lowpan</literal></para></listitem> |
| 1056 |
<listitem><para><literal>802-11-olpc-mesh</literal> (alias <literal>olpc-mesh</literal>)</para></listitem> |
| 1057 |
<listitem><para><literal>802-11-wireless</literal> (alias <literal>wifi</literal>)</para></listitem> |
| 1058 |
<listitem><para><literal>802-3-ethernet</literal> (alias <literal>ethernet</literal>)</para></listitem> |
| 1059 |
<listitem><para><literal>adsl</literal></para></listitem> |
| 1060 |
<listitem><para><literal>bluetooth</literal></para></listitem> |
| 1061 |
<listitem><para><literal>bond</literal></para></listitem> |
| 1062 |
<listitem><para><literal>bond-slave</literal> (deprecated for ethernet with controller)</para></listitem> |
| 1063 |
<listitem><para><literal>bridge</literal></para></listitem> |
| 1064 |
<listitem><para><literal>bridge-slave</literal> (deprecated for ethernet with controller)</para></listitem> |
| 1065 |
<listitem><para><literal>cdma</literal></para></listitem> |
| 1066 |
<listitem><para><literal>dummy</literal></para></listitem> |
| 1067 |
<listitem><para><literal>generic</literal></para></listitem> |
| 1068 |
<listitem><para><literal>gsm</literal></para></listitem> |
| 1069 |
<listitem><para><literal>hsr</literal></para></listitem> |
| 1070 |
<listitem><para><literal>infiniband</literal></para></listitem> |
| 1071 |
<listitem><para><literal>ip-tunnel</literal></para></listitem> |
| 1072 |
<listitem><para><literal>ipvlan</literal></para></listitem> |
| 1073 |
<listitem><para><literal>loopback</literal></para></listitem> |
| 1074 |
<listitem><para><literal>macsec</literal></para></listitem> |
| 1075 |
<listitem><para><literal>macvlan</literal></para></listitem> |
| 1076 |
<listitem><para><literal>olpc-mesh</literal></para></listitem> |
| 1077 |
<listitem><para><literal>ovs-bridge</literal></para></listitem> |
| 1078 |
<listitem><para><literal>ovs-interface</literal></para></listitem> |
| 1079 |
<listitem><para><literal>ovs-port</literal></para></listitem> |
| 1080 |
<listitem><para><literal>pppoe</literal></para></listitem> |
| 1081 |
<listitem><para><literal>team</literal></para></listitem> |
| 1082 |
<listitem><para><literal>team-slave</literal> (deprecated for ethernet with controller)</para></listitem> |
| 1083 |
<listitem><para><literal>tun</literal></para></listitem> |
| 1084 |
<listitem><para><literal>veth</literal></para></listitem> |
| 1085 |
<listitem><para><literal>vlan</literal></para></listitem> |
| 1086 |
<listitem><para><literal>vpn</literal></para></listitem> |
| 1087 |
<listitem><para><literal>vrf</literal></para></listitem> |
| 1088 |
<listitem><para><literal>vxlan</literal></para></listitem> |
| 1089 |
<listitem><para><literal>wifi-p2p</literal></para></listitem> |
| 1090 |
<listitem><para><literal>wimax</literal></para></listitem> |
| 1091 |
<listitem><para><literal>wireguard</literal></para></listitem> |
| 1092 |
<listitem><para><literal>wpan</literal></para></listitem> |
| 1093 |
</itemizedlist> |
| 1094 |
|
| 1095 |
<para>The most typical uses are described in the <link linkend='examples' endterm='examples.title' /> section.</para> |
| 1096 |
|
| 1097 |
<para>Aside from the properties and values two special options are accepted:</para> |
| 1098 |
|
| 1099 |
<variablelist> |
| 1100 |
<varlistentry> |
| 1101 |
<term><option>save</option></term> |
| 1102 |
<listitem> |
| 1103 |
<para>Controls whether the connection should be persistent, i.e. NetworkManager should |
| 1104 |
store it on disk (default: <literal>yes</literal>).</para> |
| 1105 |
</listitem> |
| 1106 |
</varlistentry> |
| 1107 |
|
| 1108 |
<varlistentry> |
| 1109 |
<term><option>--</option></term> |
| 1110 |
<listitem> |
| 1111 |
<para>If a single <option>--</option> argument is encountered it is ignored. |
| 1112 |
This is for compatibility with older versions on <command>nmcli</command>.</para> |
| 1113 |
</listitem> |
| 1114 |
</varlistentry> |
| 1115 |
</variablelist> |
| 1116 |
|
| 1117 |
<para>When the global <option>--offline</option> is used, the |
| 1118 |
command prints the resulting connection to standard output instead of |
| 1119 |
actually adding the connection via the NetworkManager daemon.</para> |
| 1120 |
</listitem> |
| 1121 |
</varlistentry> |
| 1122 |
|
| 1123 |
<varlistentry> |
| 1124 |
<term> |
| 1125 |
<command>edit</command> |
| 1126 |
<group choice='req'> |
| 1127 |
<arg choice='plain'> |
| 1128 |
<group> |
| 1129 |
<arg choice='plain'><option>id</option></arg> |
| 1130 |
<arg choice='plain'><option>uuid</option></arg> |
| 1131 |
<arg choice='plain'><option>path</option></arg> |
| 1132 |
</group> |
| 1133 |
<arg choice='plain'><replaceable>ID</replaceable></arg> |
| 1134 |
</arg> |
| 1135 |
<arg choice='plain'> |
| 1136 |
<arg><option>type</option> <replaceable>type</replaceable></arg> |
| 1137 |
<arg><option>con-name</option> <replaceable>name</replaceable></arg> |
| 1138 |
</arg> |
| 1139 |
</group> |
| 1140 |
</term> |
| 1141 |
|
| 1142 |
<listitem> |
| 1143 |
<para>Edit an existing connection or add a new one, using an interactive editor.</para> |
| 1144 |
|
| 1145 |
<para>The existing connection is identified by its name, UUID or D-Bus path. If |
| 1146 |
<replaceable>ID</replaceable> is ambiguous, a keyword <option>id</option>, |
| 1147 |
<option>uuid</option>, or <option>path</option> can be used. See |
| 1148 |
<command>connection show</command> above for the description of the |
| 1149 |
<replaceable>ID</replaceable>-specifying keywords. Not providing an |
| 1150 |
<replaceable>ID</replaceable> means that a new connection will be added.</para> |
| 1151 |
|
| 1152 |
<para>The interactive editor will guide you through the connection editing and |
| 1153 |
allow you to change connection parameters according to your needs by means of |
| 1154 |
a simple menu-driven interface. The editor indicates what settings and |
| 1155 |
properties can be modified and provides in-line help.</para> |
| 1156 |
|
| 1157 |
<para>Available options:</para> |
| 1158 |
|
| 1159 |
<variablelist> |
| 1160 |
<varlistentry> |
| 1161 |
<term><option>type</option></term> |
| 1162 |
<listitem> |
| 1163 |
<para>type of the new connection; valid types are the same as for |
| 1164 |
<command>connection add</command> command.</para> |
| 1165 |
</listitem> |
| 1166 |
</varlistentry> |
| 1167 |
<varlistentry> |
| 1168 |
<term><option>con-name</option></term> |
| 1169 |
<listitem> |
| 1170 |
<para>name for the new connection. It can be changed later in the editor.</para> |
| 1171 |
</listitem> |
| 1172 |
</varlistentry> |
| 1173 |
</variablelist> |
| 1174 |
|
| 1175 |
<para>See also |
| 1176 |
<citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum> |
| 1177 |
</citerefentry> for all NetworkManager settings and property names, and their |
| 1178 |
descriptions; and |
| 1179 |
<link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link> |
| 1180 |
for sample editor sessions.</para> |
| 1181 |
</listitem> |
| 1182 |
</varlistentry> |
| 1183 |
|
| 1184 |
<varlistentry> |
| 1185 |
<term> |
| 1186 |
<command>clone</command> |
| 1187 |
<arg><option>--temporary</option></arg> |
| 1188 |
<group> |
| 1189 |
<arg choice='plain'><option>id</option></arg> |
| 1190 |
<arg choice='plain'><option>uuid</option></arg> |
| 1191 |
<arg choice='plain'><option>path</option></arg> |
| 1192 |
</group> |
| 1193 |
<arg choice='plain'><replaceable>ID</replaceable></arg> |
| 1194 |
<arg choice='plain'><replaceable>new_name</replaceable></arg> |
| 1195 |
</term> |
| 1196 |
|
| 1197 |
<listitem> |
| 1198 |
<para>Clone a connection. The connection to be cloned is identified by its |
| 1199 |
name, UUID or D-Bus path. If <replaceable>ID</replaceable> is ambiguous, a keyword |
| 1200 |
<option>id</option>, <option>uuid</option> or <option>path</option> |
| 1201 |
can be used. See <command>connection show</command> above for the description |
| 1202 |
of the <replaceable>ID</replaceable>-specifying keywords. <replaceable>new_name</replaceable> is |
| 1203 |
the name of the new cloned connection. The new connection will be the exact |
| 1204 |
copy except the connection.id (<replaceable>new_name</replaceable>) and |
| 1205 |
connection.uuid (generated) properties.</para> |
| 1206 |
|
| 1207 |
<para>The new connection profile will be saved as persistent unless |
| 1208 |
<option>--temporary</option> option is specified, in which case the new profile |
| 1209 |
won't exist after NetworkManager restart.</para> |
| 1210 |
</listitem> |
| 1211 |
</varlistentry> |
| 1212 |
|
| 1213 |
<varlistentry> |
| 1214 |
<term> |
| 1215 |
<command>delete</command> |
| 1216 |
<group> |
| 1217 |
<arg choice='plain'><option>id</option></arg> |
| 1218 |
<arg choice='plain'><option>uuid</option></arg> |
| 1219 |
<arg choice='plain'><option>path</option></arg> |
| 1220 |
</group> |
| 1221 |
<arg choice='plain' rep='repeat'><replaceable>ID</replaceable></arg> |
| 1222 |
</term> |
| 1223 |
|
| 1224 |
<listitem> |
| 1225 |
<para>Delete a configured connection. The connection to be deleted is |
| 1226 |
identified by its name, UUID or D-Bus path. If <replaceable>ID</replaceable> is ambiguous, a |
| 1227 |
keyword <option>id</option>, <option>uuid</option> or <option>path</option> can be used. |
| 1228 |
See <command>connection show</command> above for the description of |
| 1229 |
the <replaceable>ID</replaceable>-specifying keywords.</para> |
| 1230 |
|
| 1231 |
<para>If <option>--wait</option> option is not specified, the default timeout will be 10 |
| 1232 |
seconds.</para> |
| 1233 |
</listitem> |
| 1234 |
</varlistentry> |
| 1235 |
|
| 1236 |
<varlistentry> |
| 1237 |
<term> |
| 1238 |
<command>monitor</command> |
| 1239 |
<group> |
| 1240 |
<arg choice='plain'><option>id</option></arg> |
| 1241 |
<arg choice='plain'><option>uuid</option></arg> |
| 1242 |
<arg choice='plain'><option>path</option></arg> |
| 1243 |
</group> |
| 1244 |
<arg choice='plain' rep='repeat'><replaceable>ID</replaceable></arg> |
| 1245 |
</term> |
| 1246 |
|
| 1247 |
<listitem> |
| 1248 |
<para>Monitor connection profile activity. This command prints a line whenever |
| 1249 |
the specified connection changes. The connection to be monitored is identified |
| 1250 |
by its name, UUID or D-Bus path. If <replaceable>ID</replaceable> is ambiguous, a keyword |
| 1251 |
<option>id</option>, <option>uuid</option> or <option>path</option> |
| 1252 |
can be used. See <command>connection show</command> above for the description of the |
| 1253 |
<replaceable>ID</replaceable>-specifying keywords.</para> |
| 1254 |
|
| 1255 |
<para>Monitors all connection profiles in case none is specified. The command |
| 1256 |
terminates when all monitored connections disappear. If you want to monitor |
| 1257 |
connection creation consider using the global monitor with <command>nmcli |
| 1258 |
monitor</command> command.</para> |
| 1259 |
</listitem> |
| 1260 |
</varlistentry> |
| 1261 |
|
| 1262 |
<varlistentry> |
| 1263 |
<term> |
| 1264 |
<command>reload</command> |
| 1265 |
</term> |
| 1266 |
|
| 1267 |
<listitem> |
| 1268 |
<para>Reload all connection files from disk. |
| 1269 |
NetworkManager does not monitor changes to connection. |
| 1270 |
So you need to use this command in order to tell |
| 1271 |
NetworkManager to re-read the connection profiles from |
| 1272 |
disk when a change was made to them. |
| 1273 |
</para> |
| 1274 |
</listitem> |
| 1275 |
</varlistentry> |
| 1276 |
|
| 1277 |
<varlistentry> |
| 1278 |
<term> |
| 1279 |
<command>load</command> |
| 1280 |
<arg choice='plain' rep='repeat'><replaceable>filename</replaceable></arg> |
| 1281 |
</term> |
| 1282 |
|
| 1283 |
<listitem> |
| 1284 |
<para>Load/reload one or more connection files from disk. Use this after |
| 1285 |
manually editing a connection file to ensure that |
| 1286 |
NetworkManager is aware of its latest state.</para> |
| 1287 |
</listitem> |
| 1288 |
</varlistentry> |
| 1289 |
|
| 1290 |
<varlistentry> |
| 1291 |
<term> |
| 1292 |
<command>import</command> |
| 1293 |
<arg><option>--temporary</option></arg> |
| 1294 |
<arg choice='plain'><option>type</option> <replaceable>type</replaceable></arg> |
| 1295 |
<arg choice='plain'><option>file</option> <replaceable>file</replaceable></arg> |
| 1296 |
</term> |
| 1297 |
|
| 1298 |
<listitem> |
| 1299 |
<para>Import an external/foreign configuration as a NetworkManager connection |
| 1300 |
profile. The type of the input file is specified by <option>type</option> |
| 1301 |
option.</para> |
| 1302 |
|
| 1303 |
<para>Only VPN configurations are supported at the moment. The configuration is |
| 1304 |
imported by NetworkManager VPN plugins. <option>type</option> values are |
| 1305 |
the same as for <option>vpn-type</option> option in <command>nmcli |
| 1306 |
connection add</command>. VPN configurations are imported by VPN plugins. |
| 1307 |
Therefore the proper VPN plugin has to be installed so that <command>nmcli</command> could import |
| 1308 |
the data.</para> |
| 1309 |
|
| 1310 |
<para>The imported connection profile will be saved as persistent unless |
| 1311 |
<option>--temporary</option> option is specified, in which case the new profile |
| 1312 |
won't exist after NetworkManager restart.</para> |
| 1313 |
</listitem> |
| 1314 |
</varlistentry> |
| 1315 |
|
| 1316 |
<varlistentry> |
| 1317 |
<term> |
| 1318 |
<command>export</command> |
| 1319 |
<group> |
| 1320 |
<arg choice='plain'><option>id</option></arg> |
| 1321 |
<arg choice='plain'><option>uuid</option></arg> |
| 1322 |
<arg choice='plain'><option>path</option></arg> |
| 1323 |
</group> |
| 1324 |
<arg choice='plain'><replaceable>ID</replaceable></arg> |
| 1325 |
<arg><replaceable>file</replaceable></arg> |
| 1326 |
</term> |
| 1327 |
|
| 1328 |
<listitem> |
| 1329 |
<para>Export a connection.</para> |
| 1330 |
|
| 1331 |
<para>Only VPN connections are supported at the moment. A proper VPN plugin has |
| 1332 |
to be installed so that <command>nmcli</command> could export a connection. If no |
| 1333 |
<replaceable>file</replaceable> is provided, the VPN configuration |
| 1334 |
data will be printed to standard output.</para> |
| 1335 |
</listitem> |
| 1336 |
</varlistentry> |
| 1337 |
|
| 1338 |
<varlistentry> |
| 1339 |
<term> |
| 1340 |
<command>migrate</command> |
| 1341 |
<arg> |
| 1342 |
<option>--plugin</option> |
| 1343 |
<arg choice='plain' rep='repeat'><replaceable>plugin</replaceable></arg> |
| 1344 |
</arg> |
| 1345 |
<group> |
| 1346 |
<arg choice='plain'><option>id</option></arg> |
| 1347 |
<arg choice='plain'><option>uuid</option></arg> |
| 1348 |
<arg choice='plain'><option>path</option></arg> |
| 1349 |
</group> |
| 1350 |
<arg rep='repeat'><replaceable>ID</replaceable></arg> |
| 1351 |
</term> |
| 1352 |
<listitem> |
| 1353 |
<para>Migrate connection profiles to a different settings plugin, such |
| 1354 |
as <literal>keyfile</literal> (default) or <literal>ifcfg-rh</literal>.</para> |
| 1355 |
|
| 1356 |
<para>The connection to be migrated is identified by its name, UUID or D-Bus path. |
| 1357 |
If <replaceable>ID</replaceable> is ambiguous, a keyword <option>id</option>, |
| 1358 |
<option>uuid</option> or <option>path</option> can be used. See <command>connection |
| 1359 |
show</command> above for the description of the |
| 1360 |
<replaceable>ID</replaceable>-specifying keywords.</para> |
| 1361 |
|
| 1362 |
<para>If no connections are specified, the command acts on all available |
| 1363 |
connections. Therefore, with no arguments, the command migrates all connection |
| 1364 |
profiles to the <literal>keyfile</literal> plugin.</para> |
| 1365 |
|
| 1366 |
<para>If <option>--wait</option> option is not specified, the default timeout will be 10 |
| 1367 |
seconds.</para> |
| 1368 |
</listitem> |
| 1369 |
</varlistentry> |
| 1370 |
|
| 1371 |
</variablelist> |
| 1372 |
</refsect1> |
| 1373 |
|
| 1374 |
<refsect1 id='device'><title>Device Management Commands</title> |
| 1375 |
|
| 1376 |
<cmdsynopsis> |
| 1377 |
<command>nmcli device</command> |
| 1378 |
<group choice='req'> |
| 1379 |
<arg choice='plain'><command>status</command></arg> |
| 1380 |
<arg choice='plain'><command>show</command></arg> |
| 1381 |
<arg choice='plain'><command>set</command></arg> |
| 1382 |
<arg choice='plain'><command>up</command></arg> |
| 1383 |
<arg choice='plain'><command>connect</command></arg> |
| 1384 |
<arg choice='plain'><command>reapply</command></arg> |
| 1385 |
<arg choice='plain'><command>modify</command></arg> |
| 1386 |
<arg choice='plain'><command>down</command></arg> |
| 1387 |
<arg choice='plain'><command>disconnect</command></arg> |
| 1388 |
<arg choice='plain'><command>delete</command></arg> |
| 1389 |
<arg choice='plain'><command>monitor</command></arg> |
| 1390 |
<arg choice='plain'><command>wifi</command></arg> |
| 1391 |
<arg choice='plain'><command>lldp</command></arg> |
| 1392 |
<arg choice='plain'><command>checkpoint</command></arg> |
| 1393 |
</group> |
| 1394 |
<arg rep='repeat'><replaceable>ARGUMENTS</replaceable></arg> |
| 1395 |
</cmdsynopsis> |
| 1396 |
|
| 1397 |
<para>Show and manage network interfaces.</para> |
| 1398 |
|
| 1399 |
<variablelist> |
| 1400 |
|
| 1401 |
<varlistentry> |
| 1402 |
<term><command>status</command></term> |
| 1403 |
|
| 1404 |
<listitem> |
| 1405 |
<para>Print status of devices.</para> |
| 1406 |
|
| 1407 |
<para>This is the default action if no command is specified to |
| 1408 |
<command>nmcli device</command>.</para> |
| 1409 |
</listitem> |
| 1410 |
</varlistentry> |
| 1411 |
|
| 1412 |
<varlistentry> |
| 1413 |
<term> |
| 1414 |
<command>show</command> |
| 1415 |
<arg><replaceable>ifname</replaceable></arg> |
| 1416 |
</term> |
| 1417 |
|
| 1418 |
<listitem> |
| 1419 |
<para>Show detailed information about devices. Without an argument, all |
| 1420 |
devices are examined. To get information for a specific device, the interface |
| 1421 |
name has to be provided.</para> |
| 1422 |
</listitem> |
| 1423 |
</varlistentry> |
| 1424 |
|
| 1425 |
<varlistentry> |
| 1426 |
<term> |
| 1427 |
<command>set</command> |
| 1428 |
<arg>ifname</arg> |
| 1429 |
<arg choice='plain'><replaceable>ifname</replaceable></arg> |
| 1430 |
<arg> |
| 1431 |
<option>autoconnect</option> |
| 1432 |
<group choice='req'> |
| 1433 |
<arg choice='plain'>yes</arg> |
| 1434 |
<arg choice='plain'>no</arg> |
| 1435 |
</group> |
| 1436 |
</arg> |
| 1437 |
<arg> |
| 1438 |
<option>managed</option> |
| 1439 |
<group> |
| 1440 |
<arg choice='plain'>--permanent</arg> |
| 1441 |
<arg choice='plain'>--permanent-only</arg> |
| 1442 |
</group> |
| 1443 |
<group choice='req'> |
| 1444 |
<arg choice='plain'>yes</arg> |
| 1445 |
<arg choice='plain'>no</arg> |
| 1446 |
<arg choice='plain'>up</arg> |
| 1447 |
<arg choice='plain'>down</arg> |
| 1448 |
<arg choice='plain'>reset</arg> |
| 1449 |
</group> |
| 1450 |
</arg> |
| 1451 |
</term> |
| 1452 |
|
| 1453 |
<listitem> |
| 1454 |
<para>Set device properties.</para> |
| 1455 |
|
| 1456 |
<para>The <option>managed</option> property accepts a <option>--permanent</option> |
| 1457 |
option to persist the managed state to disk, and not only in runtime. With |
| 1458 |
<option>--permanent-only</option> only the permanent managed state is set, and not the |
| 1459 |
runtime managed state. The special values <option>up</option> and <option>down</option> |
| 1460 |
can be used to set the administrative state of the device at the same time as the runtime |
| 1461 |
managed state. The <option>reset</option> value clears the explicit managed setting, and |
| 1462 |
with <option>--permanent</option> or <option>--permanent-only</option> it also removes |
| 1463 |
the persisted managed setting.</para> |
| 1464 |
</listitem> |
| 1465 |
</varlistentry> |
| 1466 |
|
| 1467 |
<varlistentry> |
| 1468 |
<term> |
| 1469 |
<command>up</command> |
| 1470 |
<arg choice='plain'><replaceable>ifname</replaceable></arg> |
| 1471 |
</term> |
| 1472 |
|
| 1473 |
<listitem> |
| 1474 |
<para>Connect the device. NetworkManager will try to find a suitable connection |
| 1475 |
that will be activated. It will also consider connections that are not set to |
| 1476 |
auto connect.</para> |
| 1477 |
|
| 1478 |
<para>If no compatible connection exists, a new profile with default |
| 1479 |
settings will be created and activated. This differentiates |
| 1480 |
<command>nmcli connection up ifname "$DEVICE"</command> from |
| 1481 |
<command>nmcli device up "$DEVICE"</command></para> |
| 1482 |
|
| 1483 |
<para>If <option>--wait</option> option is not specified, the default timeout will be 90 |
| 1484 |
seconds.</para> |
| 1485 |
</listitem> |
| 1486 |
</varlistentry> |
| 1487 |
|
| 1488 |
<varlistentry> |
| 1489 |
<term> |
| 1490 |
<command>connect</command> |
| 1491 |
<arg choice='plain'><replaceable>ifname</replaceable></arg> |
| 1492 |
</term> |
| 1493 |
|
| 1494 |
<listitem> |
| 1495 |
<para>Alias for command <command>up</command>. Before version 1.34.0 <command>up</command> |
| 1496 |
was not supported.</para> |
| 1497 |
</listitem> |
| 1498 |
</varlistentry> |
| 1499 |
|
| 1500 |
<varlistentry> |
| 1501 |
<term> |
| 1502 |
<command>reapply</command> |
| 1503 |
<arg choice='plain'><replaceable>ifname</replaceable></arg> |
| 1504 |
</term> |
| 1505 |
|
| 1506 |
<listitem> |
| 1507 |
<para>Attempt to update device with changes to the currently active connection |
| 1508 |
made since it was last applied.</para> |
| 1509 |
</listitem> |
| 1510 |
</varlistentry> |
| 1511 |
|
| 1512 |
<varlistentry> |
| 1513 |
<term> |
| 1514 |
<command>modify</command> |
| 1515 |
<arg choice='plain'><replaceable>ifname</replaceable></arg> |
| 1516 |
<arg rep='repeat' choice='plain'> |
| 1517 |
<group choice='req'> |
| 1518 |
<arg choice='plain'><replaceable>option</replaceable> <replaceable>value</replaceable></arg> |
| 1519 |
<arg choice='plain'>[+|-]<replaceable>setting</replaceable>.<replaceable>property</replaceable> <replaceable>value</replaceable></arg> |
| 1520 |
</group> |
| 1521 |
</arg> |
| 1522 |
</term> |
| 1523 |
|
| 1524 |
<listitem> |
| 1525 |
<para>Modify the settings currently active on the device.</para> |
| 1526 |
|
| 1527 |
<para>This command lets you do temporary changes to a configuration active on |
| 1528 |
a particular device. The changes are not preserved in the connection profile.</para> |
| 1529 |
|
| 1530 |
<para>See <citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum> |
| 1531 |
</citerefentry> for the list of available properties. Please note that some |
| 1532 |
properties can't be changed on an already connected device.</para> |
| 1533 |
</listitem> |
| 1534 |
</varlistentry> |
| 1535 |
|
| 1536 |
<varlistentry> |
| 1537 |
<term> |
| 1538 |
<command>down</command> |
| 1539 |
<arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg> |
| 1540 |
</term> |
| 1541 |
|
| 1542 |
<listitem> |
| 1543 |
<para>Disconnect a device and prevent the device from automatically activating |
| 1544 |
further connections without user/manual intervention. Note that disconnecting |
| 1545 |
software devices may mean that the devices will disappear.</para> |
| 1546 |
|
| 1547 |
<para>If <option>--wait</option> option is not specified, the default timeout |
| 1548 |
will be 10 seconds.</para> |
| 1549 |
</listitem> |
| 1550 |
</varlistentry> |
| 1551 |
|
| 1552 |
<varlistentry> |
| 1553 |
<term> |
| 1554 |
<command>disconnect</command> |
| 1555 |
<arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg> |
| 1556 |
</term> |
| 1557 |
|
| 1558 |
<listitem> |
| 1559 |
<para>Alias for command <command>down</command>. Before version 1.34.0 <command>down</command> |
| 1560 |
was not supported.</para> |
| 1561 |
</listitem> |
| 1562 |
</varlistentry> |
| 1563 |
|
| 1564 |
<varlistentry> |
| 1565 |
<term> |
| 1566 |
<command>delete</command> |
| 1567 |
<arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg> |
| 1568 |
</term> |
| 1569 |
|
| 1570 |
<listitem> |
| 1571 |
<para>Delete a device. The command removes the interface from the system. Note |
| 1572 |
that this only works for software devices like bonds, bridges, teams, etc. |
| 1573 |
Hardware devices (like Ethernet) cannot be deleted by the command.</para> |
| 1574 |
|
| 1575 |
<para>If <option>--wait</option> option is not specified, the default timeout will be 10 |
| 1576 |
seconds.</para> |
| 1577 |
</listitem> |
| 1578 |
</varlistentry> |
| 1579 |
|
| 1580 |
<varlistentry> |
| 1581 |
<term> |
| 1582 |
<command>monitor</command> |
| 1583 |
<arg rep='repeat'><replaceable>ifname</replaceable></arg> |
| 1584 |
</term> |
| 1585 |
|
| 1586 |
<listitem> |
| 1587 |
<para>Monitor device activity. This command prints a line whenever the |
| 1588 |
specified devices change state.</para> |
| 1589 |
|
| 1590 |
<para>Monitors all devices in case no interface is specified. The monitor |
| 1591 |
terminates when all specified devices disappear. If you want to monitor device |
| 1592 |
addition consider using the global monitor with <command>nmcli |
| 1593 |
monitor</command> command.</para> |
| 1594 |
</listitem> |
| 1595 |
</varlistentry> |
| 1596 |
|
| 1597 |
<varlistentry> |
| 1598 |
<term> |
| 1599 |
<command>wifi</command> |
| 1600 |
<arg> |
| 1601 |
<command>list</command> |
| 1602 |
<group> |
| 1603 |
<option>--rescan</option> |
| 1604 |
<arg choice='plain'><option>auto</option></arg> |
| 1605 |
<arg choice='plain'><option>no</option></arg> |
| 1606 |
<arg choice='plain'><option>yes</option></arg> |
| 1607 |
</group> |
| 1608 |
<arg><option>ifname</option> <replaceable>ifname</replaceable></arg> |
| 1609 |
<arg><option>bssid</option> <replaceable>BSSID</replaceable></arg> |
| 1610 |
</arg> |
| 1611 |
</term> |
| 1612 |
|
| 1613 |
<listitem> |
| 1614 |
<para>List available Wi-Fi access points. The <option>ifname</option> and |
| 1615 |
<option>bssid</option> options can be used to list APs for a particular |
| 1616 |
interface or with a specific BSSID, respectively.</para> |
| 1617 |
<para>By default, <command>nmcli</command> ensures that the access point list |
| 1618 |
is no older than 30 seconds and triggers a network scan if necessary. The |
| 1619 |
<option>--rescan</option> can be used to either force or disable the scan |
| 1620 |
regardless of how fresh the access point list is.</para> |
| 1621 |
</listitem> |
| 1622 |
</varlistentry> |
| 1623 |
|
| 1624 |
<varlistentry> |
| 1625 |
<term> |
| 1626 |
<command>wifi</command> |
| 1627 |
<command>connect</command> |
| 1628 |
<arg choice='plain'><replaceable>(B)SSID</replaceable></arg> |
| 1629 |
<arg><option>password</option> <replaceable>password</replaceable></arg> |
| 1630 |
<arg> |
| 1631 |
<option>wep-key-type</option> |
| 1632 |
<group choice='req'> |
| 1633 |
<arg choice='plain'>key</arg> |
| 1634 |
<arg choice='plain'>phrase</arg> |
| 1635 |
</group> |
| 1636 |
</arg> |
| 1637 |
<arg><option>ifname</option> <replaceable>ifname</replaceable></arg> |
| 1638 |
<arg><option>bssid</option> <replaceable>BSSID</replaceable></arg> |
| 1639 |
<arg><option>name</option> <replaceable>name</replaceable></arg> |
| 1640 |
<arg> |
| 1641 |
<option>private</option> |
| 1642 |
<group choice='req'> |
| 1643 |
<arg choice='plain'>yes</arg> |
| 1644 |
<arg choice='plain'>no</arg> |
| 1645 |
</group> |
| 1646 |
</arg> |
| 1647 |
<arg> |
| 1648 |
<option>hidden</option> |
| 1649 |
<group choice='req'> |
| 1650 |
<arg choice='plain'>yes</arg> |
| 1651 |
<arg choice='plain'>no</arg> |
| 1652 |
</group> |
| 1653 |
</arg> |
| 1654 |
</term> |
| 1655 |
|
| 1656 |
<listitem> |
| 1657 |
<para>Connect to a Wi-Fi network specified by SSID or BSSID. The command |
| 1658 |
finds a matching connection or creates one and then activates it on a device. |
| 1659 |
This is a command-line counterpart of clicking an SSID in a GUI client. If |
| 1660 |
a connection for the network already exists, it is possible to bring up |
| 1661 |
(activate) the existing profile as follows: |
| 1662 |
<command>nmcli con up id <replaceable>name</replaceable></command>. Note that |
| 1663 |
only open, WEP and WPA-PSK networks are supported if no previous connection |
| 1664 |
exists. It is also assumed that IP configuration is obtained via DHCP.</para> |
| 1665 |
|
| 1666 |
<para>If <option>--wait</option> option is not specified, the default timeout will be 90 |
| 1667 |
seconds.</para> |
| 1668 |
|
| 1669 |
<para>Available options are:</para> |
| 1670 |
|
| 1671 |
<variablelist> |
| 1672 |
<varlistentry> |
| 1673 |
<term><option>password</option></term> |
| 1674 |
<listitem> |
| 1675 |
<para>password for secured networks (WEP or WPA).</para> |
| 1676 |
</listitem> |
| 1677 |
</varlistentry> |
| 1678 |
<varlistentry> |
| 1679 |
<term><option>wep-key-type</option></term> |
| 1680 |
<listitem> |
| 1681 |
<para>type of WEP secret, either <option>key</option> for ASCII/HEX key or |
| 1682 |
<option>phrase</option> for passphrase.</para> |
| 1683 |
</listitem> |
| 1684 |
</varlistentry> |
| 1685 |
<varlistentry> |
| 1686 |
<term><option>ifname</option></term> |
| 1687 |
<listitem> |
| 1688 |
<para>interface that will be used for activation.</para> |
| 1689 |
</listitem> |
| 1690 |
</varlistentry> |
| 1691 |
<varlistentry> |
| 1692 |
<term><option>bssid</option></term> |
| 1693 |
<listitem> |
| 1694 |
<para>if specified, the created connection will be restricted just for the |
| 1695 |
BSSID.</para> |
| 1696 |
</listitem> |
| 1697 |
</varlistentry> |
| 1698 |
<varlistentry> |
| 1699 |
<term><option>name</option></term> |
| 1700 |
<listitem> |
| 1701 |
<para>if specified, the connection will use the name (else NM creates a name |
| 1702 |
itself).</para> |
| 1703 |
</listitem> |
| 1704 |
</varlistentry> |
| 1705 |
<varlistentry> |
| 1706 |
<term><option>private</option></term> |
| 1707 |
<listitem> |
| 1708 |
<para>if set to <literal>yes</literal>, the connection will only be visible |
| 1709 |
to the user who created it. Otherwise, the connection is system-wide, which is |
| 1710 |
the default.</para> |
| 1711 |
</listitem> |
| 1712 |
</varlistentry> |
| 1713 |
<varlistentry> |
| 1714 |
<term><option>hidden</option></term> |
| 1715 |
<listitem> |
| 1716 |
<para>set to <literal>yes</literal> when connecting for the first time to an |
| 1717 |
AP not broadcasting its SSID. Otherwise, the SSID would not be found and the |
| 1718 |
connection attempt would fail.</para> |
| 1719 |
</listitem> |
| 1720 |
</varlistentry> |
| 1721 |
</variablelist> |
| 1722 |
</listitem> |
| 1723 |
</varlistentry> |
| 1724 |
|
| 1725 |
<varlistentry> |
| 1726 |
<term> |
| 1727 |
<command>wifi</command> |
| 1728 |
<command>hotspot</command> |
| 1729 |
<arg><option>ifname</option> <replaceable>ifname</replaceable></arg> |
| 1730 |
<arg><option>con-name</option> <replaceable>name</replaceable></arg> |
| 1731 |
<arg><option>ssid</option> <replaceable>SSID</replaceable></arg> |
| 1732 |
<arg> |
| 1733 |
<option>band</option> |
| 1734 |
<group choice='req'> |
| 1735 |
<arg choice='plain'>a</arg> |
| 1736 |
<arg choice='plain'>bg</arg> |
| 1737 |
</group> |
| 1738 |
</arg> |
| 1739 |
<arg><option>channel</option> <replaceable>channel</replaceable></arg> |
| 1740 |
<arg><option>password</option> <replaceable>password</replaceable></arg> |
| 1741 |
</term> |
| 1742 |
|
| 1743 |
<listitem> |
| 1744 |
<para>Create a Wi-Fi hotspot. The command creates a hotspot connection profile |
| 1745 |
according to Wi-Fi device capabilities and activates it on the device. The |
| 1746 |
hotspot is secured with WPA if device/driver supports that, otherwise WEP is |
| 1747 |
used. Use <command>connection down</command> or <command>device |
| 1748 |
down</command> to stop the hotspot.</para> |
| 1749 |
|
| 1750 |
<para>Parameters of the hotspot can be influenced by the optional |
| 1751 |
parameters:</para> |
| 1752 |
|
| 1753 |
<variablelist> |
| 1754 |
<varlistentry> |
| 1755 |
<term><option>ifname</option></term> |
| 1756 |
<listitem> |
| 1757 |
<para>what Wi-Fi device is used.</para> |
| 1758 |
</listitem> |
| 1759 |
</varlistentry> |
| 1760 |
<varlistentry> |
| 1761 |
<term><option>con-name</option></term> |
| 1762 |
<listitem> |
| 1763 |
<para>name of the created hotspot connection profile.</para> |
| 1764 |
</listitem> |
| 1765 |
</varlistentry> |
| 1766 |
<varlistentry> |
| 1767 |
<term><option>ssid</option></term> |
| 1768 |
<listitem> |
| 1769 |
<para>SSID of the hotspot.</para> |
| 1770 |
</listitem> |
| 1771 |
</varlistentry> |
| 1772 |
<varlistentry> |
| 1773 |
<term><option>band</option></term> |
| 1774 |
<listitem> |
| 1775 |
<para>Wi-Fi band to use.</para> |
| 1776 |
</listitem> |
| 1777 |
</varlistentry> |
| 1778 |
<varlistentry> |
| 1779 |
<term><option>channel</option></term> |
| 1780 |
<listitem> |
| 1781 |
<para>Wi-Fi channel to use.</para> |
| 1782 |
</listitem> |
| 1783 |
</varlistentry> |
| 1784 |
<varlistentry> |
| 1785 |
<term><option>password</option></term> |
| 1786 |
<listitem> |
| 1787 |
<para>password to use for the created hotspot. If not provided, <command>nmcli</command> will |
| 1788 |
generate a password. The password is either WPA pre-shared key or WEP |
| 1789 |
key.</para> |
| 1790 |
|
| 1791 |
<para>Note that <option>--show-secrets</option> global option can be used to |
| 1792 |
print the hotspot password. It is useful especially when the password was |
| 1793 |
generated.</para> |
| 1794 |
</listitem> |
| 1795 |
</varlistentry> |
| 1796 |
</variablelist> |
| 1797 |
</listitem> |
| 1798 |
</varlistentry> |
| 1799 |
|
| 1800 |
<varlistentry> |
| 1801 |
<term> |
| 1802 |
<command>wifi</command> |
| 1803 |
<command>rescan</command> |
| 1804 |
<arg><option>ifname</option> <replaceable>ifname</replaceable></arg> |
| 1805 |
<arg rep='repeat'><option>ssid</option> <replaceable>SSID</replaceable></arg> |
| 1806 |
</term> |
| 1807 |
|
| 1808 |
<listitem> |
| 1809 |
<para>Request that NetworkManager immediately re-scan for |
| 1810 |
available access points. NetworkManager scans Wi-Fi networks periodically, but |
| 1811 |
in some cases it can be useful to start scanning manually (e.g. after resuming |
| 1812 |
the computer). By using <option>ssid</option>, it is possible to scan for a |
| 1813 |
specific SSID, which is useful for APs with hidden SSIDs. You can provide |
| 1814 |
multiple <option>ssid</option> parameters in order to scan more |
| 1815 |
SSIDs.</para> |
| 1816 |
|
| 1817 |
<para>This command does not show the APs, use <command>nmcli device wifi list</command> |
| 1818 |
for that.</para> |
| 1819 |
</listitem> |
| 1820 |
</varlistentry> |
| 1821 |
|
| 1822 |
<varlistentry> |
| 1823 |
<term> |
| 1824 |
<command>wifi</command> |
| 1825 |
<command>show-password</command> |
| 1826 |
<arg><option>ifname</option> <replaceable>ifname</replaceable></arg> |
| 1827 |
</term> |
| 1828 |
|
| 1829 |
<listitem> |
| 1830 |
<para>Show the details of the active Wi-Fi networks, including the |
| 1831 |
secrets.</para> |
| 1832 |
</listitem> |
| 1833 |
</varlistentry> |
| 1834 |
|
| 1835 |
<varlistentry> |
| 1836 |
<term> |
| 1837 |
<command>lldp</command> |
| 1838 |
<arg> |
| 1839 |
<command>list</command> |
| 1840 |
<arg><option>ifname</option> <replaceable>ifname</replaceable></arg> |
| 1841 |
</arg> |
| 1842 |
</term> |
| 1843 |
|
| 1844 |
<listitem> |
| 1845 |
<para>Display information about neighboring devices learned through the Link |
| 1846 |
Layer Discovery Protocol (LLDP). The <option>ifname</option> option can be |
| 1847 |
used to list neighbors only for a given interface. The protocol must be enabled |
| 1848 |
in the connection settings.</para> |
| 1849 |
</listitem> |
| 1850 |
</varlistentry> |
| 1851 |
|
| 1852 |
<varlistentry> |
| 1853 |
<term> |
| 1854 |
<command>checkpoint</command> |
| 1855 |
<arg><option>--timeout</option> <replaceable>seconds</replaceable></arg> |
| 1856 |
<arg rep='repeat'><replaceable>ifname</replaceable></arg> |
| 1857 |
<arg choice='plain'><option>--</option></arg> |
| 1858 |
<arg rep='repeat' choice='plain'><replaceable>COMMAND</replaceable></arg> |
| 1859 |
</term> |
| 1860 |
|
| 1861 |
<listitem> |
| 1862 |
<para>Runs the command with a configuration checkpoint taken and asks for a |
| 1863 |
confirmation when finished. When the confirmation is not given, the |
| 1864 |
checkpoint is automatically restored after timeout.</para> |
| 1865 |
|
| 1866 |
<para>This allows doing disruptive configuration changes over remote |
| 1867 |
connections with an option of restoring the network configuration to a |
| 1868 |
known good state in case of an error.</para> |
| 1869 |
|
| 1870 |
<para>If the a list of interface names is specified, the checkpoint is |
| 1871 |
taken, the checkpoint is takes only on the specified devices. Otherwise |
| 1872 |
a checkpoint is taken for all devices.</para> |
| 1873 |
|
| 1874 |
<para>Currently the timeout defaults to 15 seconds. This may change in |
| 1875 |
a future version.</para> |
| 1876 |
</listitem> |
| 1877 |
</varlistentry> |
| 1878 |
</variablelist> |
| 1879 |
</refsect1> |
| 1880 |
|
| 1881 |
<refsect1 id='agent'><title>Secret Agent</title> |
| 1882 |
|
| 1883 |
<cmdsynopsis> |
| 1884 |
<command>nmcli agent</command> |
| 1885 |
<group choice='req'> |
| 1886 |
<arg choice='plain'><command>secret</command></arg> |
| 1887 |
<arg choice='plain'><command>polkit</command></arg> |
| 1888 |
<arg choice='plain'><command>all</command></arg> |
| 1889 |
</group> |
| 1890 |
</cmdsynopsis> |
| 1891 |
|
| 1892 |
<para>Run <command>nmcli</command> as a NetworkManager secret agent, or polkit agent.</para> |
| 1893 |
|
| 1894 |
<variablelist> |
| 1895 |
|
| 1896 |
<varlistentry> |
| 1897 |
<term><command>secret</command></term> |
| 1898 |
|
| 1899 |
<listitem> |
| 1900 |
<para>Register <command>nmcli</command> as a NetworkManager secret agent and listen for secret |
| 1901 |
requests. You usually do not need this command, because <command>nmcli</command> can handle |
| 1902 |
secrets when connecting to networks. However, you may find the command useful |
| 1903 |
when you use another tool for activating connections and you do not have a |
| 1904 |
secret agent available (like nm-applet).</para> |
| 1905 |
</listitem> |
| 1906 |
</varlistentry> |
| 1907 |
|
| 1908 |
<varlistentry> |
| 1909 |
<term> |
| 1910 |
<command>polkit</command> |
| 1911 |
</term> |
| 1912 |
|
| 1913 |
<listitem> |
| 1914 |
<para>Register <command>nmcli</command> as a polkit agent for the user session and listen for |
| 1915 |
authorization requests. You do not usually need this command, because <command>nmcli</command> can |
| 1916 |
handle polkit actions related to NetworkManager operations (when run with |
| 1917 |
<option>--ask</option>). However, you may find the command useful when you want |
| 1918 |
to run a simple text based polkit agent and you do not have an agent of a desktop |
| 1919 |
environment. Note that running this command makes <command>nmcli</command> handle all polkit requests, |
| 1920 |
not only NetworkManager related ones, because only one polkit agent can run for the |
| 1921 |
session.</para> |
| 1922 |
</listitem> |
| 1923 |
</varlistentry> |
| 1924 |
|
| 1925 |
<varlistentry> |
| 1926 |
<term> |
| 1927 |
<command>all</command> |
| 1928 |
</term> |
| 1929 |
|
| 1930 |
<listitem> |
| 1931 |
<para>Runs <command>nmcli</command> as both NetworkManager secret and a polkit agent.</para> |
| 1932 |
</listitem> |
| 1933 |
</varlistentry> |
| 1934 |
|
| 1935 |
</variablelist> |
| 1936 |
|
| 1937 |
</refsect1> |
| 1938 |
|
| 1939 |
<refsect1 id='colors'><title id='colors.title'>Colors</title> |
| 1940 |
<para>Implicit coloring can be disabled by an empty file |
| 1941 |
<filename>/etc/terminal-colors.d/nmcli.disable</filename>.</para> |
| 1942 |
|
| 1943 |
<para>See <citerefentry><refentrytitle>terminal-colors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 1944 |
for more details about colorization configuration. |
| 1945 |
The logical color names supported by <command>nmcli</command> are:</para> |
| 1946 |
|
| 1947 |
<variablelist> |
| 1948 |
<varlistentry> |
| 1949 |
<term><option>connection-activated</option></term> |
| 1950 |
<listitem> |
| 1951 |
<para>A connection that is active.</para> |
| 1952 |
</listitem> |
| 1953 |
</varlistentry> |
| 1954 |
|
| 1955 |
<varlistentry> |
| 1956 |
<term><option>connection-activating</option></term> |
| 1957 |
<listitem> |
| 1958 |
<para>Connection that is being activated.</para> |
| 1959 |
</listitem> |
| 1960 |
</varlistentry> |
| 1961 |
|
| 1962 |
<varlistentry> |
| 1963 |
<term><option>connection-disconnecting</option></term> |
| 1964 |
<listitem> |
| 1965 |
<para>Connection that is being disconnected.</para> |
| 1966 |
</listitem> |
| 1967 |
</varlistentry> |
| 1968 |
|
| 1969 |
<varlistentry> |
| 1970 |
<term><option>connection-external</option></term> |
| 1971 |
<listitem> |
| 1972 |
<para>Connection representing configuration created externally to NetworkManager.</para> |
| 1973 |
</listitem> |
| 1974 |
</varlistentry> |
| 1975 |
|
| 1976 |
<varlistentry> |
| 1977 |
<term><option>connection-invisible</option></term> |
| 1978 |
<listitem> |
| 1979 |
<para>Connection whose details is the user not permitted to see.</para> |
| 1980 |
</listitem> |
| 1981 |
</varlistentry> |
| 1982 |
|
| 1983 |
<varlistentry> |
| 1984 |
<term><option>connection-deprecated</option></term> |
| 1985 |
<listitem> |
| 1986 |
<para>Connection that uses deprecated settings. It might not be possible to activate it.</para> |
| 1987 |
</listitem> |
| 1988 |
</varlistentry> |
| 1989 |
|
| 1990 |
<varlistentry> |
| 1991 |
<term><option>connectivity-full</option></term> |
| 1992 |
<listitem> |
| 1993 |
<para>Connectivity state when Internet is reachable.</para> |
| 1994 |
</listitem> |
| 1995 |
</varlistentry> |
| 1996 |
|
| 1997 |
<varlistentry> |
| 1998 |
<term><option>connectivity-limited</option></term> |
| 1999 |
<listitem> |
| 2000 |
<para>Connectivity state when only a local network reachable.</para> |
| 2001 |
</listitem> |
| 2002 |
</varlistentry> |
| 2003 |
|
| 2004 |
<varlistentry> |
| 2005 |
<term><option>connectivity-none</option></term> |
| 2006 |
<listitem> |
| 2007 |
<para>Connectivity state when the network is disconnected.</para> |
| 2008 |
</listitem> |
| 2009 |
</varlistentry> |
| 2010 |
|
| 2011 |
<varlistentry> |
| 2012 |
<term><option>connectivity-portal</option></term> |
| 2013 |
<listitem> |
| 2014 |
<para>Connectivity state when a captive portal hijacked the connection.</para> |
| 2015 |
</listitem> |
| 2016 |
</varlistentry> |
| 2017 |
|
| 2018 |
<varlistentry> |
| 2019 |
<term><option>connectivity-unknown</option></term> |
| 2020 |
<listitem> |
| 2021 |
<para>Connectivity state when a connectivity check didn't run.</para> |
| 2022 |
</listitem> |
| 2023 |
</varlistentry> |
| 2024 |
|
| 2025 |
<varlistentry> |
| 2026 |
<term><option>device-activated</option></term> |
| 2027 |
<listitem> |
| 2028 |
<para>Device that is connected.</para> |
| 2029 |
</listitem> |
| 2030 |
</varlistentry> |
| 2031 |
|
| 2032 |
<varlistentry> |
| 2033 |
<term><option>device-activating</option></term> |
| 2034 |
<listitem> |
| 2035 |
<para>Device that is being configured.</para> |
| 2036 |
</listitem> |
| 2037 |
</varlistentry> |
| 2038 |
|
| 2039 |
<varlistentry> |
| 2040 |
<term><option>device-disconnected</option></term> |
| 2041 |
<listitem> |
| 2042 |
<para>Device that is not connected.</para> |
| 2043 |
</listitem> |
| 2044 |
</varlistentry> |
| 2045 |
|
| 2046 |
<varlistentry> |
| 2047 |
<term><option>device-external</option></term> |
| 2048 |
<listitem> |
| 2049 |
<para>Device configured externally to NetworkManager.</para> |
| 2050 |
</listitem> |
| 2051 |
</varlistentry> |
| 2052 |
|
| 2053 |
<varlistentry> |
| 2054 |
<term><option>device-firmware-missing</option></term> |
| 2055 |
<listitem> |
| 2056 |
<para>Warning of a missing device firmware.</para> |
| 2057 |
</listitem> |
| 2058 |
</varlistentry> |
| 2059 |
|
| 2060 |
<varlistentry> |
| 2061 |
<term><option>device-plugin-missing</option></term> |
| 2062 |
<listitem> |
| 2063 |
<para>Warning of a missing device plugin.</para> |
| 2064 |
</listitem> |
| 2065 |
</varlistentry> |
| 2066 |
|
| 2067 |
<varlistentry> |
| 2068 |
<term><option>device-unavailable</option></term> |
| 2069 |
<listitem> |
| 2070 |
<para>Device that is not available for activation.</para> |
| 2071 |
</listitem> |
| 2072 |
</varlistentry> |
| 2073 |
|
| 2074 |
<varlistentry> |
| 2075 |
<term><option>device-disabled</option></term> |
| 2076 |
<listitem> |
| 2077 |
<para>Device is disabled by software or hardware kill switch.</para> |
| 2078 |
</listitem> |
| 2079 |
</varlistentry> |
| 2080 |
|
| 2081 |
<varlistentry> |
| 2082 |
<term><option>manager-running</option></term> |
| 2083 |
<listitem> |
| 2084 |
<para>Notice that the NetworkManager daemon is available.</para> |
| 2085 |
</listitem> |
| 2086 |
</varlistentry> |
| 2087 |
|
| 2088 |
<varlistentry> |
| 2089 |
<term><option>manager-starting</option></term> |
| 2090 |
<listitem> |
| 2091 |
<para>Notice that the NetworkManager daemon is being initially connected.</para> |
| 2092 |
</listitem> |
| 2093 |
</varlistentry> |
| 2094 |
|
| 2095 |
<varlistentry> |
| 2096 |
<term><option>manager-stopped</option></term> |
| 2097 |
<listitem> |
| 2098 |
<para>Notice that the NetworkManager daemon is not available.</para> |
| 2099 |
</listitem> |
| 2100 |
</varlistentry> |
| 2101 |
|
| 2102 |
<varlistentry> |
| 2103 |
<term><option>permission-auth</option></term> |
| 2104 |
<listitem> |
| 2105 |
<para>An action that requires user authentication to get permission.</para> |
| 2106 |
</listitem> |
| 2107 |
</varlistentry> |
| 2108 |
|
| 2109 |
<varlistentry> |
| 2110 |
<term><option>permission-no</option></term> |
| 2111 |
<listitem> |
| 2112 |
<para>An action that is not permitted.</para> |
| 2113 |
</listitem> |
| 2114 |
</varlistentry> |
| 2115 |
|
| 2116 |
<varlistentry> |
| 2117 |
<term><option>permission-yes</option></term> |
| 2118 |
<listitem> |
| 2119 |
<para>An action that is permitted.</para> |
| 2120 |
</listitem> |
| 2121 |
</varlistentry> |
| 2122 |
|
| 2123 |
<varlistentry> |
| 2124 |
<term><option>prompt</option></term> |
| 2125 |
<listitem> |
| 2126 |
<para>Prompt in interactive mode.</para> |
| 2127 |
</listitem> |
| 2128 |
</varlistentry> |
| 2129 |
|
| 2130 |
<varlistentry> |
| 2131 |
<term><option>state-asleep</option></term> |
| 2132 |
<listitem> |
| 2133 |
<para>Indication that NetworkManager in suspended state.</para> |
| 2134 |
</listitem> |
| 2135 |
</varlistentry> |
| 2136 |
|
| 2137 |
<varlistentry> |
| 2138 |
<term><option>state-connected-global</option></term> |
| 2139 |
<listitem> |
| 2140 |
<para>Indication that NetworkManager in connected to Internet.</para> |
| 2141 |
</listitem> |
| 2142 |
</varlistentry> |
| 2143 |
|
| 2144 |
<varlistentry> |
| 2145 |
<term><option>state-connected-local</option></term> |
| 2146 |
<listitem> |
| 2147 |
<para>Indication that NetworkManager in local network.</para> |
| 2148 |
</listitem> |
| 2149 |
</varlistentry> |
| 2150 |
|
| 2151 |
<varlistentry> |
| 2152 |
<term><option>state-connected-site</option></term> |
| 2153 |
<listitem> |
| 2154 |
<para>Indication that NetworkManager in connected to networks other than Internet.</para> |
| 2155 |
</listitem> |
| 2156 |
</varlistentry> |
| 2157 |
|
| 2158 |
<varlistentry> |
| 2159 |
<term><option>state-connecting</option></term> |
| 2160 |
<listitem> |
| 2161 |
<para>Indication that NetworkManager is establishing a network connection.</para> |
| 2162 |
</listitem> |
| 2163 |
</varlistentry> |
| 2164 |
|
| 2165 |
<varlistentry> |
| 2166 |
<term><option>state-disconnected</option></term> |
| 2167 |
<listitem> |
| 2168 |
<para>Indication that NetworkManager is disconnected from a network.</para> |
| 2169 |
</listitem> |
| 2170 |
</varlistentry> |
| 2171 |
|
| 2172 |
<varlistentry> |
| 2173 |
<term><option>state-disconnecting</option></term> |
| 2174 |
<listitem> |
| 2175 |
<para>Indication that NetworkManager is being disconnected from a network.</para> |
| 2176 |
</listitem> |
| 2177 |
</varlistentry> |
| 2178 |
|
| 2179 |
<varlistentry> |
| 2180 |
<term><option>wifi-signal-excellent</option></term> |
| 2181 |
<listitem> |
| 2182 |
<para>Wi-Fi network with an excellent signal level.</para> |
| 2183 |
</listitem> |
| 2184 |
</varlistentry> |
| 2185 |
|
| 2186 |
<varlistentry> |
| 2187 |
<term><option>wifi-signal-fair</option></term> |
| 2188 |
<listitem> |
| 2189 |
<para>Wi-Fi network with a fair signal level.</para> |
| 2190 |
</listitem> |
| 2191 |
</varlistentry> |
| 2192 |
|
| 2193 |
<varlistentry> |
| 2194 |
<term><option>wifi-signal-good</option></term> |
| 2195 |
<listitem> |
| 2196 |
<para>Wi-Fi network with a good signal level.</para> |
| 2197 |
</listitem> |
| 2198 |
</varlistentry> |
| 2199 |
|
| 2200 |
<varlistentry> |
| 2201 |
<term><option>wifi-signal-poor</option></term> |
| 2202 |
<listitem> |
| 2203 |
<para>Wi-Fi network with a poor signal level.</para> |
| 2204 |
</listitem> |
| 2205 |
</varlistentry> |
| 2206 |
|
| 2207 |
<varlistentry> |
| 2208 |
<term><option>wifi-signal-unknown</option></term> |
| 2209 |
<listitem> |
| 2210 |
<para>Wi-Fi network that hasn't been actually seen (a hidden AP).</para> |
| 2211 |
</listitem> |
| 2212 |
</varlistentry> |
| 2213 |
|
| 2214 |
<varlistentry> |
| 2215 |
<term><option>wifi-deprecated</option></term> |
| 2216 |
<listitem> |
| 2217 |
<para>Wi-Fi network that might be impossible to connect to due to use of deprecated functionality.</para> |
| 2218 |
</listitem> |
| 2219 |
</varlistentry> |
| 2220 |
|
| 2221 |
<varlistentry> |
| 2222 |
<term><option>disabled</option></term> |
| 2223 |
<listitem> |
| 2224 |
<para>A property that is turned off.</para> |
| 2225 |
</listitem> |
| 2226 |
</varlistentry> |
| 2227 |
|
| 2228 |
<varlistentry> |
| 2229 |
<term><option>enabled</option></term> |
| 2230 |
<listitem> |
| 2231 |
<para>A property that is turned on.</para> |
| 2232 |
</listitem> |
| 2233 |
</varlistentry> |
| 2234 |
</variablelist> |
| 2235 |
</refsect1> |
| 2236 |
|
| 2237 |
<refsect1 id='environment_variables'><title>Environment Variables</title> |
| 2238 |
|
| 2239 |
<para><command>nmcli</command>'s behavior is affected by the following |
| 2240 |
environment variables.</para> |
| 2241 |
|
| 2242 |
<variablelist> |
| 2243 |
<varlistentry> |
| 2244 |
<term><envar>LC_ALL</envar></term> |
| 2245 |
<listitem> |
| 2246 |
<para>If set to a non-empty string value, it overrides the values of all the |
| 2247 |
other internationalization variables.</para> |
| 2248 |
</listitem> |
| 2249 |
</varlistentry> |
| 2250 |
|
| 2251 |
<varlistentry> |
| 2252 |
<term><envar>LC_MESSAGES</envar></term> |
| 2253 |
<listitem> |
| 2254 |
<para>Determines the locale to be used for internationalized messages.</para> |
| 2255 |
</listitem> |
| 2256 |
</varlistentry> |
| 2257 |
|
| 2258 |
<varlistentry> |
| 2259 |
<term><envar>LANG</envar></term> |
| 2260 |
<listitem> |
| 2261 |
<para>Provides a default value for the internationalization variables that are |
| 2262 |
unset or null.</para> |
| 2263 |
</listitem> |
| 2264 |
</varlistentry> |
| 2265 |
|
| 2266 |
<varlistentry> |
| 2267 |
<term><envar>NO_COLOR</envar></term> |
| 2268 |
<listitem> |
| 2269 |
<para>Default to not producing colored and paged output. The |
| 2270 |
<option>--colors</option> option, if used, takes precedence.</para> |
| 2271 |
</listitem> |
| 2272 |
</varlistentry> |
| 2273 |
|
| 2274 |
<varlistentry> |
| 2275 |
<term><envar>PAGER</envar></term> |
| 2276 |
<listitem> |
| 2277 |
<para>Filter to pipe the output through if it doesn't fit on a screen. |
| 2278 |
Can be a file name of an executable or a shell command. Empty string to |
| 2279 |
disable the functionality.</para> |
| 2280 |
|
| 2281 |
<para>Note that the pager command is expected to handle wide characters |
| 2282 |
and ANSI escape sequences for changing colors (unless they're disabled). |
| 2283 |
<command>nmcli</command> sets up the environment variables |
| 2284 |
<envar>LESS</envar> and <envar>LESSCHARSET</envar> appropriately for the |
| 2285 |
<citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 2286 |
pager, other pagers may or may not need extra configuration.</para> |
| 2287 |
|
| 2288 |
<para>If unspecified, |
| 2289 |
<citerefentry><refentrytitle>pager</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
| 2290 |
<citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 2291 |
and <citerefentry><refentrytitle>more</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 2292 |
will be tried (in that order).</para> |
| 2293 |
</listitem> |
| 2294 |
</varlistentry> |
| 2295 |
|
| 2296 |
<varlistentry> |
| 2297 |
<term><envar>TERM</envar></term> |
| 2298 |
<listitem> |
| 2299 |
<para>Terminal type. If <literal>dumb</literal>, <command>nmcli</command> |
| 2300 |
will not use a pager or produce ANSI escape sequences for coloring.</para> |
| 2301 |
<para>Terminal types other than <literal>dumb</literal> are assumed to |
| 2302 |
support ASCII escape sequences for setting the output color.</para> |
| 2303 |
</listitem> |
| 2304 |
</varlistentry> |
| 2305 |
</variablelist> |
| 2306 |
</refsect1> |
| 2307 |
|
| 2308 |
<refsect1 id='internationalization_notes'><title>Internationalization notes</title> |
| 2309 |
|
| 2310 |
<para>Be aware that <command>nmcli</command> is localized and that is why the |
| 2311 |
output depends on your environment. This is important to realize especially |
| 2312 |
when you parse the output.</para> |
| 2313 |
|
| 2314 |
<para>Call <command>nmcli</command> as <command>LC_ALL=C nmcli</command> to |
| 2315 |
be sure the locale is set to <literal>C</literal> while executing in a script.</para> |
| 2316 |
|
| 2317 |
<para><envar>LC_ALL</envar>, <envar>LC_MESSAGES</envar>, <envar>LANG</envar> |
| 2318 |
variables specify the <envar>LC_MESSAGES</envar> locale category (in that |
| 2319 |
order), which determines the language that <command>nmcli</command> uses for |
| 2320 |
messages. The <literal>C</literal> locale is used if none of these variables are set, and this |
| 2321 |
locale uses English messages.</para> |
| 2322 |
|
| 2323 |
</refsect1> |
| 2324 |
|
| 2325 |
<refsect1 id='exit_status'><title>Exit Status</title> |
| 2326 |
|
| 2327 |
<para><command>nmcli</command> exits with status 0 if it succeeds, a value |
| 2328 |
greater than 0 is returned if an error occurs.</para> |
| 2329 |
|
| 2330 |
<variablelist spacing='compact' termlength='3'> |
| 2331 |
<varlistentry> |
| 2332 |
<term><errorcode>0</errorcode></term> |
| 2333 |
<listitem> |
| 2334 |
<para>Success – indicates the operation succeeded.</para> |
| 2335 |
</listitem> |
| 2336 |
</varlistentry> |
| 2337 |
|
| 2338 |
<varlistentry> |
| 2339 |
<term><errorcode>1</errorcode></term> |
| 2340 |
<listitem> |
| 2341 |
<para>Unknown or unspecified error.</para> |
| 2342 |
</listitem> |
| 2343 |
</varlistentry> |
| 2344 |
|
| 2345 |
<varlistentry> |
| 2346 |
<term><errorcode>2</errorcode></term> |
| 2347 |
<listitem> |
| 2348 |
<para>Invalid user input, wrong <command>nmcli</command> |
| 2349 |
invocation.</para> |
| 2350 |
</listitem> |
| 2351 |
</varlistentry> |
| 2352 |
|
| 2353 |
<varlistentry> |
| 2354 |
<term><errorcode>3</errorcode></term> |
| 2355 |
<listitem> |
| 2356 |
<para>Timeout expired (see <option>--wait</option> option).</para> |
| 2357 |
</listitem> |
| 2358 |
</varlistentry> |
| 2359 |
|
| 2360 |
<varlistentry> |
| 2361 |
<term><errorcode>4</errorcode></term> |
| 2362 |
<listitem> |
| 2363 |
<para>Connection activation failed.</para> |
| 2364 |
</listitem> |
| 2365 |
</varlistentry> |
| 2366 |
|
| 2367 |
<varlistentry> |
| 2368 |
<term><errorcode>5</errorcode></term> |
| 2369 |
<listitem> |
| 2370 |
<para>Connection deactivation failed.</para> |
| 2371 |
</listitem> |
| 2372 |
</varlistentry> |
| 2373 |
|
| 2374 |
<varlistentry> |
| 2375 |
<term><errorcode>6</errorcode></term> |
| 2376 |
<listitem> |
| 2377 |
<para>Disconnecting device failed.</para> |
| 2378 |
</listitem> |
| 2379 |
</varlistentry> |
| 2380 |
|
| 2381 |
<varlistentry> |
| 2382 |
<term><errorcode>7</errorcode></term> |
| 2383 |
<listitem> |
| 2384 |
<para>Connection deletion failed.</para> |
| 2385 |
</listitem> |
| 2386 |
</varlistentry> |
| 2387 |
|
| 2388 |
<varlistentry> |
| 2389 |
<term><errorcode>8</errorcode></term> |
| 2390 |
<listitem> |
| 2391 |
<para>NetworkManager is not running.</para> |
| 2392 |
</listitem> |
| 2393 |
</varlistentry> |
| 2394 |
|
| 2395 |
<varlistentry> |
| 2396 |
<term><errorcode>10</errorcode></term> |
| 2397 |
<listitem> |
| 2398 |
<para>Connection, device, or access point does not exist.</para> |
| 2399 |
</listitem> |
| 2400 |
</varlistentry> |
| 2401 |
|
| 2402 |
<varlistentry> |
| 2403 |
<term><errorcode>65</errorcode></term> |
| 2404 |
<listitem> |
| 2405 |
<para>When used with <option>--complete-args</option> option, a file name is expected to follow.</para> |
| 2406 |
</listitem> |
| 2407 |
</varlistentry> |
| 2408 |
</variablelist> |
| 2409 |
</refsect1> |
| 2410 |
|
| 2411 |
<refsect1 id='examples'><title id='examples.title'>Examples</title> |
| 2412 |
|
| 2413 |
<para>This section presents various examples of <command>nmcli</command> usage. If you want even |
| 2414 |
more, please refer to |
| 2415 |
<link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link> |
| 2416 |
manual page.</para> |
| 2417 |
|
| 2418 |
<variablelist> |
| 2419 |
<varlistentry> |
| 2420 |
<term><userinput>nmcli -t -f RUNNING general</userinput></term> |
| 2421 |
<listitem> |
| 2422 |
<para>tells you whether NetworkManager is running or not.</para> |
| 2423 |
</listitem> |
| 2424 |
</varlistentry> |
| 2425 |
|
| 2426 |
<varlistentry> |
| 2427 |
<term><userinput>nmcli -t -f STATE general</userinput></term> |
| 2428 |
<listitem> |
| 2429 |
<para>shows the overall status of NetworkManager.</para> |
| 2430 |
</listitem> |
| 2431 |
</varlistentry> |
| 2432 |
|
| 2433 |
<varlistentry> |
| 2434 |
<term><userinput>nmcli radio wifi off</userinput></term> |
| 2435 |
<listitem> |
| 2436 |
<para>switches Wi-Fi off.</para> |
| 2437 |
</listitem> |
| 2438 |
</varlistentry> |
| 2439 |
|
| 2440 |
<varlistentry> |
| 2441 |
<term><userinput>nmcli connection show</userinput></term> |
| 2442 |
<listitem> |
| 2443 |
<para>lists all connections NetworkManager has.</para> |
| 2444 |
</listitem> |
| 2445 |
</varlistentry> |
| 2446 |
|
| 2447 |
<varlistentry> |
| 2448 |
<term><userinput>nmcli -p -m multiline -f all con show</userinput></term> |
| 2449 |
<listitem> |
| 2450 |
<para>shows all configured connections in multi-line mode.</para> |
| 2451 |
</listitem> |
| 2452 |
</varlistentry> |
| 2453 |
|
| 2454 |
<varlistentry> |
| 2455 |
<term><userinput>nmcli connection show --active</userinput></term> |
| 2456 |
<listitem> |
| 2457 |
<para>lists all currently active connections.</para> |
| 2458 |
</listitem> |
| 2459 |
</varlistentry> |
| 2460 |
|
| 2461 |
<varlistentry> |
| 2462 |
<term><userinput>nmcli -f name,autoconnect c s</userinput></term> |
| 2463 |
<listitem> |
| 2464 |
<para>shows all connection profile names and their auto-connect property.</para> |
| 2465 |
</listitem> |
| 2466 |
</varlistentry> |
| 2467 |
|
| 2468 |
<varlistentry> |
| 2469 |
<term><userinput>nmcli -p connection show "My default em1"</userinput></term> |
| 2470 |
<listitem> |
| 2471 |
<para>shows details for "My default em1" connection profile.</para> |
| 2472 |
</listitem> |
| 2473 |
</varlistentry> |
| 2474 |
|
| 2475 |
<varlistentry> |
| 2476 |
<term><userinput>nmcli --show-secrets connection show "My Home Wi-Fi"</userinput></term> |
| 2477 |
<listitem> |
| 2478 |
<para>shows details for "My Home Wi-Fi" connection profile with all passwords. |
| 2479 |
Without <option>--show-secrets</option> option, secrets would not be |
| 2480 |
displayed.</para> |
| 2481 |
</listitem> |
| 2482 |
</varlistentry> |
| 2483 |
|
| 2484 |
<varlistentry> |
| 2485 |
<term><userinput>nmcli -f active connection show "My default em1"</userinput></term> |
| 2486 |
<listitem> |
| 2487 |
<para>shows details for "My default em1" active connection, like IP, DHCP |
| 2488 |
information, etc.</para> |
| 2489 |
</listitem> |
| 2490 |
</varlistentry> |
| 2491 |
|
| 2492 |
<varlistentry> |
| 2493 |
<term><userinput>nmcli -f profile con s "My wired connection"</userinput></term> |
| 2494 |
<listitem> |
| 2495 |
<para>shows static configuration details of the connection profile with "My |
| 2496 |
wired connection" name.</para> |
| 2497 |
</listitem> |
| 2498 |
</varlistentry> |
| 2499 |
|
| 2500 |
<varlistentry> |
| 2501 |
<term><userinput>nmcli -p con up "My wired connection" ifname eth0</userinput></term> |
| 2502 |
<listitem> |
| 2503 |
<para>activates the connection profile with name "My wired connection" on |
| 2504 |
interface eth0. The -p option makes <command>nmcli</command> show progress of the |
| 2505 |
activation.</para> |
| 2506 |
</listitem> |
| 2507 |
</varlistentry> |
| 2508 |
|
| 2509 |
<varlistentry> |
| 2510 |
<term><userinput>nmcli con up 6b028a27-6dc9-4411-9886-e9ad1dd43761 ap 00:3A:98:7C:42:D3</userinput></term> |
| 2511 |
<listitem> |
| 2512 |
<para>connects the Wi-Fi connection with UUID |
| 2513 |
6b028a27-6dc9-4411-9886-e9ad1dd43761 to the AP with BSSID |
| 2514 |
00:3A:98:7C:42:D3.</para> |
| 2515 |
</listitem> |
| 2516 |
</varlistentry> |
| 2517 |
|
| 2518 |
<varlistentry> |
| 2519 |
<term><userinput>nmcli device status</userinput></term> |
| 2520 |
<listitem> |
| 2521 |
<para>shows the status for all devices.</para> |
| 2522 |
</listitem> |
| 2523 |
</varlistentry> |
| 2524 |
|
| 2525 |
<varlistentry> |
| 2526 |
<term><userinput>nmcli dev down em2</userinput></term> |
| 2527 |
<listitem> |
| 2528 |
<para>disconnects a connection on interface em2 and marks the device as |
| 2529 |
unavailable for auto-connecting. As a result, no connection will automatically |
| 2530 |
be activated on the device until the device's 'autoconnect' is set to TRUE or |
| 2531 |
the user manually activates a connection.</para> |
| 2532 |
</listitem> |
| 2533 |
</varlistentry> |
| 2534 |
|
| 2535 |
<varlistentry> |
| 2536 |
<term><userinput>nmcli -f GENERAL,WIFI-PROPERTIES dev show wlan0</userinput></term> |
| 2537 |
<listitem> |
| 2538 |
<para>shows details for wlan0 interface; only GENERAL and WIFI-PROPERTIES |
| 2539 |
sections will be shown.</para> |
| 2540 |
</listitem> |
| 2541 |
</varlistentry> |
| 2542 |
|
| 2543 |
<varlistentry> |
| 2544 |
<term><userinput>nmcli -f CONNECTIONS device show wlp3s0</userinput></term> |
| 2545 |
<listitem> |
| 2546 |
<para>shows all available connection profiles for your Wi-Fi interface |
| 2547 |
wlp3s0.</para> |
| 2548 |
</listitem> |
| 2549 |
</varlistentry> |
| 2550 |
|
| 2551 |
<varlistentry> |
| 2552 |
<term><userinput>nmcli dev wifi</userinput></term> |
| 2553 |
<listitem> |
| 2554 |
<para>lists available Wi-Fi access points known to NetworkManager.</para> |
| 2555 |
</listitem> |
| 2556 |
</varlistentry> |
| 2557 |
|
| 2558 |
<varlistentry> |
| 2559 |
<term><userinput>nmcli dev wifi con "Cafe Hotspot 1" password caffeine name "My cafe"</userinput></term> |
| 2560 |
<listitem> |
| 2561 |
<para>creates a new connection named "My cafe" and then connects it to "Cafe |
| 2562 |
Hotspot 1" SSID using password "caffeine". This is mainly useful when |
| 2563 |
connecting to "Cafe Hotspot 1" for the first time. Next time, it is better to |
| 2564 |
use <command>nmcli con up id "My cafe"</command> so that the |
| 2565 |
existing connection profile can be used and no additional is created.</para> |
| 2566 |
</listitem> |
| 2567 |
</varlistentry> |
| 2568 |
|
| 2569 |
<varlistentry> |
| 2570 |
<term><userinput>nmcli -s dev wifi hotspot con-name QuickHotspot</userinput></term> |
| 2571 |
<listitem> |
| 2572 |
<para>creates a hotspot profile and connects it. Prints the hotspot password |
| 2573 |
the user should use to connect to the hotspot from other devices.</para> |
| 2574 |
</listitem> |
| 2575 |
</varlistentry> |
| 2576 |
|
| 2577 |
<varlistentry> |
| 2578 |
<term><userinput>nmcli dev modify em1 ipv4.method shared</userinput></term> |
| 2579 |
<listitem> |
| 2580 |
<para>starts IPv4 connection sharing using em1 device. The sharing will be active |
| 2581 |
until the device is disconnected.</para> |
| 2582 |
</listitem> |
| 2583 |
</varlistentry> |
| 2584 |
|
| 2585 |
<varlistentry> |
| 2586 |
<term><userinput>nmcli dev modify em1 ipv6.address 2001:db8::a:bad:c0de</userinput></term> |
| 2587 |
<listitem> |
| 2588 |
<para>temporarily adds an IP address to a device. The address will be removed |
| 2589 |
when the same connection is activated again.</para> |
| 2590 |
</listitem> |
| 2591 |
</varlistentry> |
| 2592 |
|
| 2593 |
<varlistentry> |
| 2594 |
<term><userinput>nmcli connection add type ethernet autoconnect no ifname eth0</userinput></term> |
| 2595 |
<listitem> |
| 2596 |
<para>non-interactively adds an Ethernet connection tied to eth0 interface with |
| 2597 |
automatic IP configuration (DHCP), and disables the connection's <literal>autoconnect</literal> |
| 2598 |
flag.</para> |
| 2599 |
</listitem> |
| 2600 |
</varlistentry> |
| 2601 |
|
| 2602 |
<varlistentry> |
| 2603 |
<term><userinput>nmcli c a ifname Maxipes-fik type vlan dev eth0 id 55</userinput></term> |
| 2604 |
<listitem> |
| 2605 |
<para>non-interactively adds a VLAN connection with ID 55. The connection will |
| 2606 |
use eth0 and the VLAN interface will be named Maxipes-fik.</para> |
| 2607 |
</listitem> |
| 2608 |
</varlistentry> |
| 2609 |
|
| 2610 |
<varlistentry> |
| 2611 |
<term><userinput>nmcli c a ifname eth0 type ethernet ipv4.method disabled ipv6.method link-local</userinput></term> |
| 2612 |
<listitem> |
| 2613 |
<para>non-interactively adds a connection that will use eth0 Ethernet interface |
| 2614 |
and only have an IPv6 link-local address configured.</para> |
| 2615 |
</listitem> |
| 2616 |
</varlistentry> |
| 2617 |
|
| 2618 |
<varlistentry> |
| 2619 |
<term><userinput>nmcli connection edit ethernet-em1-2</userinput></term> |
| 2620 |
<listitem> |
| 2621 |
<para>edits existing "ethernet-em1-2" connection in the interactive |
| 2622 |
editor.</para> |
| 2623 |
</listitem> |
| 2624 |
</varlistentry> |
| 2625 |
|
| 2626 |
<varlistentry> |
| 2627 |
<term><userinput>nmcli connection edit type ethernet con-name "yet another Ethernet connection"</userinput></term> |
| 2628 |
<listitem> |
| 2629 |
<para>adds a new Ethernet connection in the interactive editor.</para> |
| 2630 |
</listitem> |
| 2631 |
</varlistentry> |
| 2632 |
|
| 2633 |
<varlistentry> |
| 2634 |
<term><userinput>nmcli con mod ethernet-2 connection.autoconnect no</userinput></term> |
| 2635 |
<listitem> |
| 2636 |
<para>modifies 'autoconnect' property in the 'connection' setting of |
| 2637 |
'ethernet-2' connection.</para> |
| 2638 |
</listitem> |
| 2639 |
</varlistentry> |
| 2640 |
|
| 2641 |
<varlistentry> |
| 2642 |
<term><userinput>nmcli con mod "Home Wi-Fi" wifi.mtu 1350</userinput></term> |
| 2643 |
<listitem> |
| 2644 |
<para>modifies 'mtu' property in the 'wifi' setting of 'Home Wi-Fi' |
| 2645 |
connection.</para> |
| 2646 |
</listitem> |
| 2647 |
</varlistentry> |
| 2648 |
|
| 2649 |
<varlistentry> |
| 2650 |
<term><userinput>nmcli con mod em1-1 ipv4.method manual ipv4.addr "192.168.1.23/24 192.168.1.1, 10.10.1.5/8, 10.0.0.11"</userinput></term> |
| 2651 |
<listitem> |
| 2652 |
<para>sets manual addressing and the addresses in em1-1 profile.</para> |
| 2653 |
</listitem> |
| 2654 |
</varlistentry> |
| 2655 |
|
| 2656 |
<varlistentry> |
| 2657 |
<term><userinput>nmcli con modify ABC +ipv4.dns 8.8.8.8</userinput></term> |
| 2658 |
<listitem> |
| 2659 |
<para>appends a Google public DNS server to DNS servers in ABC profile.</para> |
| 2660 |
</listitem> |
| 2661 |
</varlistentry> |
| 2662 |
|
| 2663 |
<varlistentry> |
| 2664 |
<term><userinput>nmcli con modify ABC -ipv4.addresses "192.168.100.25/24 192.168.1.1"</userinput></term> |
| 2665 |
<listitem> |
| 2666 |
<para>removes the specified IP address from (static) profile ABC.</para> |
| 2667 |
</listitem> |
| 2668 |
</varlistentry> |
| 2669 |
|
| 2670 |
<varlistentry> |
| 2671 |
<term><userinput>nmcli con import type openvpn file ~/Downloads/frootvpn.ovpn</userinput></term> |
| 2672 |
<listitem> |
| 2673 |
<para>imports an OpenVPN configuration to NetworkManager.</para> |
| 2674 |
</listitem> |
| 2675 |
</varlistentry> |
| 2676 |
|
| 2677 |
<varlistentry> |
| 2678 |
<term><userinput>nmcli con export corp-vpnc /home/joe/corpvpn.conf</userinput></term> |
| 2679 |
<listitem> |
| 2680 |
<para>exports NetworkManager VPN profile corp-vpnc as standard Cisco (vpnc) |
| 2681 |
configuration.</para> |
| 2682 |
</listitem> |
| 2683 |
</varlistentry> |
| 2684 |
</variablelist> |
| 2685 |
</refsect1> |
| 2686 |
|
| 2687 |
<refsect1 id='notes'><title>Notes</title> |
| 2688 |
<para><command>nmcli</command> accepts abbreviations, as long as they are a unique prefix in the set |
| 2689 |
of possible options. As new options get added, these abbreviations are not guaranteed |
| 2690 |
to stay unique. For scripting and long term compatibility it is therefore strongly |
| 2691 |
advised to spell out the full option names.</para> |
| 2692 |
</refsect1> |
| 2693 |
|
| 2694 |
<refsect1 id='bugs'><title>Bugs</title> |
| 2695 |
<para>There are probably some bugs. If you find a bug, please report it to your distribution |
| 2696 |
or upstream at <literal>https://gitlab.freedesktop.org/NetworkManager/NetworkManager</literal>.</para> |
| 2697 |
</refsect1> |
| 2698 |
|
| 2699 |
<refsect1 id='see_also'><title>See Also</title> |
| 2700 |
<para> |
| 2701 |
<link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link>, |
| 2702 |
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>, |
| 2703 |
<link linkend='nm-online'><citerefentry><refentrytitle>nm-online</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>, |
| 2704 |
<link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>, |
| 2705 |
<link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>, |
| 2706 |
<citerefentry><refentrytitle>nm-applet</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
| 2707 |
<citerefentry><refentrytitle>nm-connection-editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
| 2708 |
<citerefentry><refentrytitle>terminal-colors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 2709 |
</para> |
| 2710 |
</refsect1> |
| 2711 |
|
| 2712 |
</refentry> |