diff options
| author | Michael Biebl <biebl@debian.org> | 2014-07-06 02:16:10 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2014-07-06 02:16:10 +0200 |
| commit | 33491bc4279481db8ae47213e34a6d695a0e8830 (patch) | |
| tree | 097d2b0fdff3fae6885381ae5e57a182cd8cbbba /man/nmcli.1.in | |
| parent | 59c3714a494c3b3765657c0551ad82842d98a7d2 (diff) | |
Imported Upstream version 0.9.10.0 upstream/0.9.10.0
Diffstat (limited to 'man/nmcli.1.in')
| -rw-r--r-- | man/nmcli.1.in | 881 |
1 files changed, 650 insertions, 231 deletions
diff --git a/man/nmcli.1.in b/man/nmcli.1.in index ee48aba6..08f07b4a 100644 --- a/man/nmcli.1.in +++ b/man/nmcli.1.in @@ -19,9 +19,9 @@ .\" with this manual; if not, write to the Free Software Foundation, Inc., .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. .\" -.\" Copyright (C) 2010 - 2013 Red Hat, Inc. +.\" Copyright (C) 2010 - 2014 Red Hat, Inc. .\" -.TH NMCLI "1" "17 January 2013" +.TH NMCLI "1" "28 February 2014" .SH NAME nmcli \- command\(hyline tool for controlling NetworkManager @@ -33,7 +33,8 @@ nmcli \- command\(hyline tool for controlling NetworkManager .sp .IR OBJECT " := { " -.BR nm " | " con " | " dev " } " +.BR general " | " networking " | " radio " | " connection " | " device +.RI " }" .sp .IR OPTIONS " := { " @@ -48,6 +49,12 @@ nmcli \- command\(hyline tool for controlling NetworkManager .br \fB\-e\fR[\fIscape\fR] yes | no .br +\fB\-n\fR[\fIocheck\fR] +.br +\fB\-a\fR[\fIsk\fR] +.br +\fB\-w\fR[\fIait\fR] <seconds> +.br \fB\-v\fR[\fIersion\fR] .br \fB\-h\fR[\fIelp\fR] @@ -56,27 +63,23 @@ nmcli \- command\(hyline tool for controlling NetworkManager .SH DESCRIPTION .B nmcli -is a command\(hyline tool for controlling NetworkManager and reporting on its status. -It is not meant as a full replacement for \fInm\(hyapplet\fP or other similar clients -but as a complementary utility to those programs. -The main usage for \fInmcli\fP is on servers, headless machines or for power users -who prefer the command line. +is a command\(hyline tool for controlling NetworkManager and reporting network +status. It can be utilized as a replacement for \fInm\(hyapplet\fP or other +graphical clients. \fInmcli\fP is used to create, display, edit, delete, activate, +and deactivate network connections, as well as control and display network device +status. .P -Typical applications include: -.IP \(em 4 -Initscripts: ifup/ifdown can utilize NetworkManager via \fInmcli\fP instead of -having to manage connections itself and possibly interfere with NetworkManager. +Typical uses include: .IP \(em 4 -Servers, headless machines: No GUI is available; then \fInmcli\fP can be used -to activate/deactivate connections. However, if a connection requires a secret -in order to activate and if that secret is not stored at the system level, -\fInmcli\fP will not be able to activate it; it is currently unable to supply -the secrets to NetworkManager. +Scripts: utilize NetworkManager via \fInmcli\fP instead of managing network +connections manually. \fInmcli\fP supports a terse output format which is better +suited for script processing. Note that NetworkManager can also execute scripts, +called "dispatcher scripts", in response to network events. See +\fBNetworkManager\fP for details about these dispatcher scripts. .IP \(em 4 -User sessions: \fInmcli\fP can be used to activate/deactivate connections from -the command line, but a client with a secret agent (like \fInm\(hyapplet\fP) is needed -for supplying secrets not stored at the system level. Keyring dialogs and -password prompts may appear if this happens. +Servers, headless machines, and terminals: \fInmcli\fP can be used to control +NetworkManager without a GUI, including creating, editing, starting and stopping +network connections and viewing network status. .SS \fIOPTIONS\fP .TP .B \-t, \-\-terse @@ -91,11 +94,11 @@ for humans, i.e. values are aligned, headers are printed, etc. Switch between \fItabular\fP and \fImultiline\fP output. If omitted, default is \fItabular\fP for most commands. For the commands producing more structured information, that cannot be displayed on a single -line, default is \fImultiline\fP. Currenly, they are: +line, default is \fImultiline\fP. Currently, they are: .br .nf - 'nmcli con list id|uuid <name>' - 'nmcli dev list' + 'nmcli connection show <ID>' + 'nmcli device show' .fi \fItabular\fP \(en Output is a table where each line describes a single entry. Columns define particular properties of the entry. @@ -120,6 +123,22 @@ Whether to escape ':' and '\\' characters in terse tabular mode. The escape character is '\\'. If omitted, default is \fIyes\fP. .TP +.B \-n, \-\-nocheck +This option can be used to force \fInmcli\fP to skip checking \fInmcli\fP and +\fINetworkManager\fP version compatibility. Use it with care, because using +incompatible versions may produce incorrect results. +.TP +.B \-a, \-\-ask +When using this option \fInmcli\fP will stop and ask for any missing required +arguments, so do not use this option for non-interactive purposes like scripts. +.TP +.B \-w, \-\-wait <seconds> +This option sets a timeout period for which \fInmcli\fP will wait for \fINetworkManager\fP +to finsh operations. It is especially useful for commands that may take a longer time to +complete, e.g. connection activation. +Specifying a value of \fB0\fP instructs \fInmcli\fP not to wait but to exit immediately +with a status of success. The default value depends on the executed command. +.TP .B \-v, \-\-version Show \fInmcli\fP version. .TP @@ -127,261 +146,591 @@ Show \fInmcli\fP version. Print help information. .SS \fIOBJECT\fP .TP -.B nm -NetworkManager +.B general \- general \fINetworkManager\fP status and operations .br -Use this object to inquire and change state of NetworkManager. +Use this object to show NetworkManager status and permissions. You can also get +and change system hostname, as well as NetworkManager logging level and domains. .TP -.SS \fICOMMAND\fP := { status | permissions | enable | sleep | wifi | wwan | wimax } +.SS \fICOMMAND\fP := { status | hostname | permissions | logging } .sp .RS .TP .B status .br -Show overall status of NetworkManager. This is the default action, when no -command is provided to \fInm\fP object. +Show overall status of NetworkManager. This is the default action, when no additional +command is provided for \fIgeneral\fP object. +.TP +.B hostname [<hostname>] .br -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi +Get and change system hostname. With no arguments, this prints currently configured hostname. +When you pass a hostname, it will be handed over to NetworkManager to be set as a new system +hostname. +.br +Note that the term \fBsystem\fP hostname may also be referred to as \fBpersistent\fP or +\fBstatic\fP by other programs or tools. The hostname is stored in /etc/hostname +file in most distributions. For example, systemd-hostnamed service uses the term +\fBstatic\fP hostname and it only reads the /etc/hostname file when it starts. .TP .B permissions .br Show the permissions a caller has for various authenticated operations that -NetworkManager provides, like enable/disable networking, changing Wi\(hyFi, WWAN, -and WiMAX state, modifying connections, etc. +NetworkManager provides, like enable and disable networking, changing Wi\(hyFi, +WWAN, and WiMAX state, modifying connections, etc. +.TP +.B logging [level <log level>] [domains <log domains>] .br -.nf -\fBReference to D\(hyBus:\fP -interface: org.freedesktop.NetworkManager -method: GetPermissions -arguments: none -.fi +Get and change \fINetworkManager\fP logging level and domains. Without any argument +current logging level and domains are shown. In order to change logging state, provide +\fIlevel\fP and, or, \fIdomain\fP parameters. See \fBNetworkManager.conf\fP for available +level and domain values. +.RE + +.TP +.B networking \- get or set general networking state of NetworkManager +.br +Use this object to show NetworkManager networking status, or to enable and disable +networking. Disabling networking removes the configuration from all devices and +changes them to the 'unmanaged' state. +.TP +.SS \fICOMMAND\fP := { [ on | off | connectivity ] } +.sp +.RS .TP -.B enable [true|false] +.B [ on | off ] .br -Get networking\(hyenabled status or enable/disable networking by NetworkManager. +Get networking\(hyenabled status or enable and disable networking by NetworkManager. All interfaces managed by NetworkManager are deactivated when networking has been disabled. -.br -.nf -\fBReference to D\(hyBus:\fP -interface: org.freedesktop.NetworkManager -method: Enable -arguments: TRUE or FALSE -.fi .TP -.B sleep [true|false] +.B connectivity [check] .br -Get sleep status or put to sleep/awake NetworkManager. All interfaces managed -by NetworkManager are deactivated when it falls asleep. This command is not -meant for user to enable/disable networking, use \fIenable\fP for that. D\(hyBus -\fISleep\fP method is designed to put NetworkManager to sleep or awake for -suspending/resuming the computer. +Get network connectivity state. +The optional \fIcheck\fP argument tells NetworkManager to re-check the connectivity, +else the most recent known connectivity state is displayed without re-checking. .br -.nf -\fBReference to D\(hyBus:\fP -interface: org.freedesktop.NetworkManager -method: Sleep -arguments: TRUE or FALSE -.fi +Possible states are: +.RS +.PP +.IP \fInone\fP 9 +\(en the host is not connected to any network +.IP \fIportal\fP 9 +\(en the host is behind a captive portal and cannot reach the full Internet +.IP \fIlimited\fP 9 +\(en the host is connected to a network, but it has no access to the Internet +.IP \fIfull\fP 9 +\(en the host is connected to a network and has full access to the Internet +.IP \fIunknown\fP 9 +\(en the connectivity status cannot be found out +.RE +.RE + .TP -.B wifi [on|off] +.B radio \- get or set radio switch states .br -Inquire or set status of Wi\(hyFi in NetworkManager. If no arguments are supplied, -Wi\(hyFi status is printed; \fIon\fP enables Wi\(hyFi; \fIoff\fP disables Wi\(hyFi. -.br -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi +Use this object to show radio switches status, or enable and disable +the switches. .TP -.B wwan [on|off] -.br -Inquire or set status of WWAN in NetworkManager. If no arguments are supplied, -WWAN status is printed; \fIon\fP enables WWAN; \fIoff\fP disables WWAN. +.SS \fICOMMAND\fP := { all | wifi | wwan | wimax } +.sp +.RS +.TP +.B wifi [ on | off ] .br -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi +Show or set status of Wi\(hyFi in NetworkManager. If no arguments are supplied, +Wi\(hyFi status is printed; \fIon\fP enables Wi\(hyFi; \fIoff\fP disables Wi\(hyFi. .TP -.B wimax [on|off] +.B wwan [ on | off ] .br -Inquire or set status of WiMAX in NetworkManager. If no arguments are supplied, -WiMAX status is printed; \fIon\fP enables WiMAX; \fIoff\fP disables WiMAX. +Show or set status of WWAN (mobile broadband) in NetworkManager. If no arguments +are supplied, mobile broadband status is printed; \fIon\fP enables mobile broadband, +\fIoff\fP disables it. +.TP +.B wimax [ on | off ] .br -Note: WiMAX support is a compile\(hytime decision, so it may be unavailable on some +Show or set status of WiMAX in NetworkManager. If no arguments are supplied, +WiMAX status is printed; \fIon\fP enables WiMAX; \fIoff\fP disables WiMAX. Note: +WiMAX support is a compile\(hytime decision, so it may be unavailable on some installations. -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi +.TP +.B all [ on | off ] +.br +Show or set all previously mentioned radio switches at the same time. .RE .TP -.B con -Connections -.br -Get information about NetworkManager's connections. +.B connection \- start, stop, and manage network connections +.sp +NetworkManager stores all network configuration as \fIconnections\fP, which are +collections of data (Layer2 details, IP addressing, etc.) that describe +how to create or connect to a network. A connection is \fIactive\fP when +a device uses that connection's configuration to create or connect to a network. +There may be multiple connections that apply to a device, but only one of them +can be active on that device at any given time. The additional connections can +be used to allow quick switching between different networks and configurations. +.sp +Consider a machine which is usually connected to a DHCP-enabled network, but +sometimes connected to a testing network which uses static IP addressing. Instead +of manually reconfiguring eth0 each time the network is changed, the settings can +be saved as two connections which both apply to eth0, one for DHCP (called +"default") and one with the static addressing details (called "testing"). When +connected to the DHCP-enabled network the user would run "nmcli con up default" +, and when connected to the static network the user would run "nmcli con up testing". .TP -.SS \fICOMMAND\fP := { list | status | up | down | delete } +.SS \fICOMMAND\fP := { show | up | down | add | edit | modify | delete | reload | load } .sp .RS .TP -.B list [id <id> | uuid <id>] -.br -List configured connections. Without a parameter, all connections -are listed. In order to get connection details, \fIid\fP with connection's -name or \fIuuid\fP with connection's UUID shall be specified. When no command -is given to the \fIcon\fP object, the default action is 'nmcli con list'. +.B show [--active] .br -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi +List in-memory and on-disk connection profiles, some of which may also be +active if a device is using that connection profile. Without a parameter, all +profiles are listed. When --active option is specified, only the active profiles +are shown. .TP -.B status +.B show [--active] [ id | uuid | path | apath ] <ID> ... +.br +Show details for specified connections. By default, both static configuration +and active connection data are displayed. When --active option is specified, +only the active profiles are taken into +account. +\fIid\fP, \fIuuid\fP, \fIpath\fP and \fIapath\fP keywords can be used if +\fI<ID>\fP is ambiguous. +.RS +.PP +Optional <ID>-specifying keywords are: +.IP \fIid\fP 13 +\(en the <ID> denotes a connection name +.IP \fIuuid\fP 13 +\(en the <ID> denotes a connection UUID +.IP \fIpath\fP 13 +\(en the <ID> denotes a D-Bus static connection path +in the format of /org/freedesktop/NetworkManager/Settings/<num> or just <num> +.IP \fIapath\fP 13 +\(en the <ID> denotes a D-Bus active connection path +in the format of /org/freedesktop/NetworkManager/ActiveConnection/<num> or just <num> +.PP +It is possible to filter the output using the global \fI--fields\fP option. Use the following +values: +.RE +.RS +.PP +.IP \fIprofile\fP 13 +\(en only shows static profile configuration +.IP \fIactive\fP 13 +\(en only shows active connection data (when the profile is active) +.PP +You can also specify particular fields. For static configuration, use setting and property names +as described in \fInm-settings\fP(5) manual page. For active data use GENERAL, IP4, DHCP4, IP6, +DHCP6, VPN. +.PP +When no command is given to the \fIconnection\fP object, the default action +is 'nmcli connection show'. +.RE +.TP +.B up [ id | uuid | path ] <ID> [ifname <ifname>] [ap <BSSID>] [nsp <name>] +.RE +.RS +.B up ifname <ifname> [ap <BSSID>] [nsp <name>] +.RS .br -Print status of active connections. +Activate a connection. The connection is identified by its name, UUID or D-Bus +path. If <ID> is ambiguous, a keyword \fIid\fP, \fIuuid\fP or \fIpath\fP can be +used. When requiring a particular device to activate the connection on, the +\fIifname\fP option with interface name should be given. If the <ID> is not +given an \fIifname\fP is required, and NetworkManager will activate the best +available connection for the given \fIifname\fP. In case of a VPN connection, +the \fIifname\fP option specifies the device of the base connection. The +\fIap\fP option specify what particular AP should be used in case of a Wi\(hyFi +connection. .br -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi -.TP -.B up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [nsp <name>] [\-\-nowait] [\-\-timeout <timeout>] +If '--wait' option is not specified, the default timeout will be 90 seconds. .br -Activate a connection. The connection is identified by its name using \fIid\fP -or UUID using \fIuuid\fP. When requiring a particular device to activate the -connection on, the \fIiface\fP option with interface name should be given. In -case of a VPN connection, the \fIiface\fP option specify the device of the base -connection. The \fIap\fP option specify what particular AP should be used in case -of a Wi\(hyFi connection. +See \fBconnection show\fP above for the description of the <ID>-specifying keywords. .RS .PP Available options are: -.IP \fIiface\fP 13 +.IP \fIifname\fP 13 \(en interface that will be used for activation .IP \fIap\fP 13 \(en BSSID of the AP which the command should connect to (for Wi\(hyFi connections) .IP \fInsp\fP 13 \(en NSP (Network Service Provider) which the command should connect to (for WiMAX connections) -.IP \fI\-\-nowait\fP 13 -\(en exit immediately without waiting for command completion -.IP \fI\-\-timeout\fP 13 -\(en how long to wait for command completion (default is 90 s) -.PP -.br -.nf -\fBReference to D\(hyBus:\fP -interface: org.freedesktop.NetworkManager -method: ActivateConnection -arguments: according to arguments -.fi .RE - +.RE .TP -.B down id <id> | uuid <id> +.B down [ id | uuid | path | apath ] <ID> .br -Deactivate a connection. -The connection is identified by its name using \fIid\fP -or UUID using \fIuuid\fP. +Deactivate a connection from a device without preventing the device from +further auto-activation. +.sp +Be aware that this command deactivates the specified active connection. The device +on which the connection was active, is still ready to connect and will perform +auto-activation by looking for a suitable connection that has the 'autoconnect' +flag set. This includes the just deactivated connection, so if the connection is set +to auto-connect, it will be automatically started on the disconnected device again. .br -.nf -\fBReference to D\(hyBus:\fP -interface: org.freedesktop.NetworkManager -method: DeactivateConnection -arguments: according to arguments -.fi +In most cases you may want to use \fIdevice disconnect\fP command instead. +.sp +The connection is identified by its name, UUID or D-Bus path. +If <ID> is ambiguous, a keyword \fIid\fP, \fIuuid\fP, \fIpath\fP or +\fIapath\fP can be used. +.br +See \fBconnection show\fP above for the description of the <ID>-specifying keywords. .TP -.B delete id <id> | uuid <id> +.B add COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS IP_OPTIONS .br -Delete a configured connection. The connection to delete is specified with -\fIid\fP (connection name) or \fIuuid\fP (connection UUID). +Add a connection for NetworkManager. Arguments differ according to connection types, see below. +.RS +.TP +.B COMMON_OPTIONS: +.IP "\fItype <type>\fP" 42 +\(en connection type; see below \fBTYPE_SPECIFIC_OPTIONS\fP for allowed values; (mandatory) +.IP "\fIifname <ifname> | \(dq\&*\(dq\&\fP" 42 +\(en interface to bind the connection to. The connection will only be applicable to this +interface name. A special value of "\fB*\fP" can be used for interface-independent connections. +The \fIifname\fP argument is mandatory for all connection types except bond, team, bridge and vlan. +Note: use quotes around \fB*\fP to suppress shell expansion. +.IP "\fI[con-name <connection name>]\fP" 42 +\(en connection name (when not provided a default name is generated: <type>[-<ifname>][-<num>]) +.IP "\fI[autoconnect yes|no]\fP" 42 +\(en whether the connection profile can be automatically activated (default: yes) +.IP "\fI[save yes|no]\fP" 42 +\(en whether the connection should be persistent, i.e. NetworkManager should store it on disk (default: yes) +.RE +.RS +.TP +.B TYPE_SPECIFIC_OPTIONS: +.TP +.B ethernet: +.IP "\fI[mac <MAC address>]\fP" 42 +\(en MAC address of the device this connection is locked to +.IP "\fI[cloned-mac <cloned MAC address>]\fP" 42 +\(en cloned MAC +.IP "\fI[mtu <MTU>]\fP" 42 +\(en MTU +.RE +.RS +.TP +.B wifi: +.IP "\fIssid <SSID>\fP" 42 +\(en SSID +.IP "\fI[mac <MAC address>]\fP" 42 +\(en MAC address of the device this connection is locked to +.IP "\fI[cloned-mac <cloned MAC address>]\fP" 42 +\(en cloned MAC +.IP "\fI[mtu <MTU>]\fP" 42 +\(en MTU +.RE +.RS +.TP +.B wimax: +.IP "\fI[mac <MAC address>]\fP" 42 +\(en MAC address of the device this connection is locked to +.IP "\fI[nsp <NSP>]\fP" 42 +\(en Network Service Provider name +.RE +.RS +.TP +.B pppoe: +.IP "\fIusername <PPPoE username>\fP" 42 +\(en PPPoE username +.IP "\fI[password <PPPoE password>]\fP" 42 +\(en Password for the PPPoE username +.IP "\fI[service <PPPoE service name>]\fP" 42 +\(en PPPoE service name (if required by concentrator) +.IP "\fI[mtu <MTU>]\fP" 42 +\(en MTU +.IP "\fI[mac <MAC address>]\fP" 42 +\(en MAC address of the device this connection is locked to +.RE +.RS +.TP +.B gsm: +.IP "\fIapn <APN>\fP" 42 +\(en APN - GSM Access Point Name +.IP "\fI[user <username>]\fP" 42 +\(en user name +.IP "\fI[password <password>]\fP" 42 +\(en password +.RE +.RS +.TP +.B cdma: +.IP "\fI[user <username>]\fP" 42 +\(en user name +.IP "\fI[password <password>]\fP" 42 +\(en password +.RE +.RS +.TP +.B infiniband: +.IP "\fI[mac <MAC address>]\fP" 42 +\(en MAC address of the device this connection is locked to (InfiniBand MAC is 20 bytes) +.IP "\fI[mtu <MTU>]\fP" 42 +\(en MTU +.IP "\fI[transport-mode datagram | connected]\fP" 42 +\(en InfiniBand transport mode +.IP "\fI[parent <interface name>]\fP" 42 +\(en the interface name of the parent device (if any) +.IP "\fI[p-key <IPoIB P_Key>]\fP" 42 +\(en the InfiniBand P_Key (16-bit unsigned integer) +.RE +.RS +.TP +.B bluetooth: +.IP "\fI[addr <bluetooth address>]\fP" 42 +\(en Bluetooth device address (MAC) +.IP "\fI[bt-type panu|dun-gsm|dun-cdma]\fP" 42 +\(en Bluetooth connection type +.RE +.RS +.TP +.B vlan: +.IP "\fIdev <parent device (connection UUID, ifname, or MAC)>\fP" 42 +\(en parent device this VLAN is on +.IP "\fIid <VLAN ID>\fP" 42 +\(en VLAN ID in range <0-4095> +.IP "\fI[flags <VLAN flags>]\fP" 42 +\(en flags +.IP "\fI[ingress <ingress priority mapping>]\fP" 42 +\(en VLAN ingress priority mapping +.IP "\fI[egress <egress priority mapping>]\fP" 42 +\(en VLAN egress priority mapping +.IP "\fI[mtu <MTU>]\fP" 42 +\(en MTU +.RE +.RS +.TP +.B bond: +.IP "\fI[mode balance-rr (0) | active-backup (1) | balance-xor (2) | broadcast (3) |\fP" +.IP "\fI 802.3ad (4) | balance-tlb (5) | balance-alb (6)]\fP" 42 +\(en bonding mode (default: balance-rr) +.IP "\fI[primary <ifname>]\fP" 42 +\(en primary interface name (for "active-backup" mode) +.IP "\fI[miimon <num>]\fP" 42 +\(en miimon (default: 100) +.IP "\fI[downdelay <num>]\fP" 42 +\(en downdelay (default: 0) +.IP "\fI[updelay <num>]\fP" 42 +\(en updelay (default: 0) +.IP "\fI[arp-interval <num>]\fP" 42 +\(en ARP interval (default: 0) +.IP "\fI[arp-ip-target <num>]\fP" 42 +\(en ARP IP target +.RE +.RS +.TP +.B bond-slave: +.IP "\fImaster <master (ifname, or connection UUID or name)>\fP" 42 +\(en master bond interface name, or connection UUID or ID of bond master connection profile. +The value can be prefixed with \fBifname/\fP, \fBuuid/\fP or \fBid/\fP to disambiguate it. +.RE +.RS +.TP +.B team: +.IP "\fI[config <file>|<raw JSON data>]\fP" 42 +\(en JSON configuration for team +.RE +.RS +.TP +.B team-slave: +.IP "\fImaster <master (ifname, or connection UUID or name)>\fP" 42 +\(en master team interface name, or connection UUID or ID of team master connection profile. +The value can be prefixed with \fBifname/\fP, \fBuuid/\fP or \fBid/\fP to disambiguate it. +.IP "\fI[config <file>|<raw JSON data>]\fP" 42 +\(en JSON configuration for team +.RE +.RS +.TP +.B bridge: +.IP "\fI[stp yes|no]\fP" 42 +\(en controls whether Spanning Tree Protocol (STP) is enabled for this bridge (default: yes) +.IP "\fI[priority <num>]\fP" 42 +\(en sets STP priority (default: 128) +.IP "\fI[forward-delay <2-30>]\fP" 42 +\(en STP forwarding delay, in seconds (default: 15) +.IP "\fI[hello-time <1-10>]\fP" 42 +\(en STP hello time, in seconds (default: 2) +.IP "\fI[max-age <6-42>]\fP" 42 +\(en STP maximum message age, in seconds (default: 20) +.IP "\fI[ageing-time <0-1000000>]\fP" 42 +\(en the Ethernet MAC address aging time, in seconds (default: 300) +.IP "\fI[mac <MAC address>]\fP" 42 +\(en MAC address of the bridge (note: this requires a recent kernel feature, +originally introduced in 3.15 upstream kernel) +.RE +.RS +.TP +.B bridge-slave: +.IP "\fImaster <master (ifname, or connection UUID or name)>\fP" 42 +\(en master bridge interface name, or connection UUID or ID of bridge master connection profile. +The value can be prefixed with \fBifname/\fP, \fBuuid/\fP or \fBid/\fP to disambiguate it. +.IP "\fI[priority <0-63>]\fP" 42 +\(en STP priority of this slave (default: 32) +.IP "\fI[path-cost <1-65535>]\fP" 42 +\(en STP port cost for destinations via this slave (default: 100) +.IP "\fI[hairpin yes|no]\fP" 42 +\(en 'hairpin mode' for the slave, which allows frames +to be sent back out through the slave the frame was received on (default: yes) +.RE +.RS +.TP +.B vpn: +.IP "\fIvpn-type vpnc|openvpn|pptp|openconnect|openswan|libreswan|ssh|l2tp|iodine|...\fP" 42 +\(en VPN type +.IP "\fI[user <username>]\fP" 42 +\(en VPN username +.RE +.RS +.TP +.B olpc-mesh: +.IP "\fIssid <SSID>\fP" 42 +\(en SSID +.IP "\fI[channel <1-13>]\fP" 42 +\(en channel to use for the network +.IP "\fI[dhcp-anycast <MAC address>]\fP" 42 +\(en anycast DHCP MAC address used when requesting an IP address via DHCP +.RE +.RS +.TP +.B IP_OPTIONS: +.IP "\fI[ip4 <IPv4 address>] [gw4 <IPv4 gateway>]\fP" 42 +\(en IPv4 addresses +.IP "\fI[ip6 <IPv6 address>] [gw6 <IPv6 gateway>]\fP" 42 +\(en IPv6 addresses +.RE +.TP +.B edit [id | uuid | path ] <ID> - edit an existing connection +.RE +.RS +.B edit [type <new connection type>] [con-name <new connection name>] - add a new connection +.RS +Edit an existing connection or add a new one, using an interactive editor. .br -.nf -\fBReference to D\(hyBus:\fP -interface: org.freedesktop.NetworkManager.Settings.Connection -method: Delete -arguments: none -.fi +The existing connection is identified by its name, UUID or D-Bus path. +If <ID> is ambiguous, a keyword \fIid\fP, \fIuuid\fP, or \fIpath\fP can be used. +See \fBconnection show\fP above for the description of the <ID>-specifying keywords. +Not providing an <ID> means that a new connection will be added. +.sp +The interactive editor will guide you through the connection editing and +allow you to change connection parameters according to your needs by means of +a simple menu-driven interface. The editor indicates what settings and +properties can be modified and provides in-line help. +.sp +.PP +Available options: +.IP \fItype\fP 13 +\(en type of the new connection; valid types are the same as for \fIconnection add\fP command +.IP \fIcon-name\fP 13 +\(en name for the new connection. It can be changed later in the editor. +.RE +.RS +.sp +See also \fInm-settings\fP(5) for all NetworkManager settings and property names, and their +descriptions; and \fInmcli-examples\fP(5) for sample editor sessions. +.RE +.TP +.B modify [--temporary] [ id | uuid | path ] <ID> [+|-]<setting>.<property> <value> +.B [+|-]<setting>.<property> <value> ... +.br +Modify one or more properties in the connection profile. +.br +The connection is identified by its name, UUID or D-Bus path. If <ID> is +ambiguous, a keyword \fIid\fP, \fIuuid\fP or \fIpath\fP can be used. See +\fInm-settings\fP(5) for setting and property names, their descriptions and +default values. This command supports abbreviations for \fIsetting name\fP and +\fIproperty name\fP provided they are unique. Empty \fIvalue\fP ("") removes +the property value (sets the property to the default value). The provided +value overwrites the existing property value. +.br +If you want to append an item to the existing value, use \fI+\fP prefix for the +property name. If you want to remove just one item from container-type +property, use \fI-\fP prefix for the property name and specify a value or an +zero-based index of the item to remove (or option name for properties with +named options) as \fIvalue\fP. Of course, \fI+|-\fP only have a real effect for +multi-value (container) properties like ipv4.dns, ipv4.addresses, bond.options, +etc. +.br +The changes to the connection profile will be saved persistently by +NetworkManager, unless \fI--temporary\fP option is provided, in which case the +changes won't persist over NetworkManager restart. +.TP +.B delete [ id | uuid | path ] <ID> ... +.br +Delete a configured connection. The connection to be deleted is identified by +its name, UUID or D-Bus path. If <ID> is ambiguous, a keyword \fIid\fP, +\fIuuid\fP or \fIpath\fP can be used. +.br +See \fBconnection show\fP above for the description of the <ID>-specifying keywords. +.TP +.B reload +.br +Reload all connection files from disk. \fINetworkManager\fP does not monitor +changes to connection files by default. So you need to use this command in order +to tell \fINetworkManager\fP to re-read the connection profiles from disk when +a change was made to them. However, the auto-loading feature can be enabled and +then \fINetworkManager\fP will reload connection files any time they change +(monitor-connection-files=true in \fINetworkManager.conf\fP(5)). +.TP +.B load <filename> [<filename>...] +.br +Load/reload one or more connection files from disk. Use this after manually +editing a connection file to ensure that \fBNetworkManager\fP is aware +of its latest state. .RE .TP -.B dev -Devices +.B device - show and manage network interfaces .br -Get information about devices. .TP -.SS \fICOMMAND\fP := { status | list | disconnect | wifi } +.SS \fICOMMAND\fP := { status | show | connect | disconnect | wifi | wimax } .sp .RS .TP .B status .br -Print status of devices. This is the default action, when no command -is specified to \fIdev\fP object. +Print status of devices. .br -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi +This is the default action if no command is specified to \fIdevice\fP object. .TP -.B list [iface <iface>] +.B show [<ifname>] .br -Get detailed information about devices. Without an argument, all devices are -examined. To get information for a specific device, the \fIiface\fP argument -with the interface name should be provided. +Show detailed information about devices. Without an argument, all devices are +examined. To get information for a specific device, the interface name has +to be provided. +.TP +.B connect <ifname> .br -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi +Connect the device. NetworkManager will try to find a suitable connection that +will be activated. It will also consider connections that are not set to auto connect. +.br +If '--wait' option is not specified, the default timeout will be 90 seconds. .TP -.B disconnect iface <iface> [\-\-nowait] [\-\-timeout <timeout>] +.B disconnect <ifname> .br Disconnect a device and prevent the device from automatically activating further connections without user/manual intervention. -.RS -.PP -Available options are: -.IP \fI\-\-nowait\fP 13 -\(en exit immediately without waiting for command completion -.IP \fI\-\-timeout\fP 13 -\(en how long to wait for command completion (default is 10 s) -.PP .br -.nf -\fBReference to D\(hyBus:\fP -interface: org.freedesktop.NetworkManager.Device -method: Disconnect -arguments: none -.fi -.RE +If '--wait' option is not specified, the default timeout will be 10 seconds. .TP -.B wifi [list [iface <iface>] [bssid <BSSID>]] +.B wifi [list [ifname <ifname>] [bssid <BSSID>]] .br -List available Wi\(hyFi access points. The \fIiface\fP and \fIbssid\fP options +List available Wi\(hyFi access points. The \fIifname\fP and \fIbssid\fP options can be used to list APs for a particular interface or with a specific BSSID, respectively. -.br -.nf -\fBReference to D\(hyBus:\fP -No simple reference. -.fi .TP -.B wifi connect <(B)SSID> [password <password>] [wep\-key\-type key|phrase] [iface <iface>] [bssid <BSSID>] [name <name>] [\-\-private] [\-\-nowait] [\-\-timeout <timeout>] +.B wifi connect <(B)SSID> [password <password>] [wep\-key\-type key|phrase] [ifname <ifname>] [bssid <BSSID>] [name <name>] [private yes|no] .br Connect to a Wi\(hyFi network specified by SSID or BSSID. The command creates a new connection and then activates it on a device. This is a command\(hyline counterpart of clicking an SSID in a GUI client. The command always creates a new connection and thus it is mainly useful for connecting to new Wi\(hyFi networks. If a connection -for the network already exists, it's better to connect through it using -\fInmcli con up id <name>\fP. Note that only open, WEP and WPA\(hyPSK networks are -supported at the moment. It is also supposed that IP configuration is obtained via +for the network already exists, it is better to bring up (activate) the existing connection +as follows: \fInmcli con up id <name>\fP. Note that only open, WEP and WPA\(hyPSK networks +are supported at the moment. It is also supposed that IP configuration is obtained via DHCP. +.br +If '--wait' option is not specified, the default timeout will be 90 seconds. .RS .PP Available options are: @@ -389,27 +738,29 @@ Available options are: \(en password for secured networks (WEP or WPA) .IP \fIwep\-key\-type\fP 13 \(en type of WEP secret, either \fIkey\fP for ASCII/HEX key or \fIphrase\fP for passphrase -.IP \fIiface\fP 13 +.IP \fIifname\fP 13 \(en interface that will be used for activation .IP \fIbssid\fP 13 \(en if specified, the created connection will be restricted just for the BSSID .IP \fIname\fP 13 \(en if specified, the connection will use the name (else NM creates a name itself) -.IP \fI\-\-private\fP 13 -\(en the connection will only be visible to the user who created it (else the connection is system\(hywide) -.IP \fI\-\-nowait\fP 13 -\(en exit immediately without waiting for command completion -.IP \fI\-\-timeout\fP 13 -\(en how long to wait for command completion (default is 90 s) -.PP -.br -.nf -\fBReference to D\(hyBus:\fP -interface: org.freedesktop.NetworkManager -method: AddAndActivateConnection -arguments: according to arguments -.fi +.IP \fIprivate\fP 13 +\(en if set to \fByes\fP, the connection will only be visible to the user who created it. +Otherwise the connection is system\(hywide, which is the default. .RE +.TP +.B wifi rescan [[ifname] <ifname>] +.br +Request that \fINetworkManager\fP immediately re-scan for available access points. +NetworkManager scans Wi\(hyFi networks periodically, but in some cases it can be +useful to start scanning manually (e.g. after resuming the computer). +This command does not show the APs, use 'nmcli device wifi list' for that. +.TP +.B wimax [list [ifname <ifname>] [nsp <name>]] +.br +List available WiMAX NSP. The \fIifname\fP and \fInsp\fP options +can be used to list networks for a particular interface or with a specific +NSP, respectively. .SH ENVIRONMENT VARIABLES \fInmcli\fP's behavior is affected by the following environment variables. @@ -425,7 +776,7 @@ or null. .RE Internationalization notes: .br -Be aware that \fInmcli\fP is localized and that's why the output depends on +Be aware that \fInmcli\fP is localized and that is why the output depends on your environment. This is important to realize especially when you parse the output. .br @@ -447,7 +798,7 @@ Unknown or unspecified error .IP "2" 4 Invalid user input, wrong \fInmcli\fP invocation .IP "3" 4 -Timeout expired (see commands with \fI\-\-timeout\fP option) +Timeout expired (see \fI\-\-wait\fP option) .IP "4" 4 Connection activation failed .IP "5" 4 @@ -460,56 +811,79 @@ Connection deletion failed NetworkManager is not running .IP "9" 4 \fInmcli\fP and \fINetworkManager\fP versions mismatch +.IP "10" 4 +Connection, device, or access point does not exist. .SH EXAMPLES -.IP "\fB\f(CWnmcli \-t \-f RUNNING nm\fP\fP" +.PP +This section presents various examples of nmcli usage. If you want even more, +please refer to \fInmcli-examples\fP(5) manual page. +.sp +.IP "\fB\f(CWnmcli \-t \-f RUNNING general\fP\fP" .IP tells you whether NetworkManager is running or not. -.IP "\fB\f(CWnmcli \-t \-f STATE nm\fP\fP" +.IP "\fB\f(CWnmcli \-t \-f STATE general\fP\fP" .IP shows the overall status of NetworkManager. -.IP "\fB\f(CWnmcli nm wifi off\fP\fP" +.IP "\fB\f(CWnmcli radio wifi off\fP\fP" .IP switches Wi\(hyFi off. -.IP "\fB\f(CWnmcli \-p con list\fP\fP" +.IP "\fB\f(CWnmcli connection show\fP\fP" .IP lists all connections NetworkManager has. -.IP "\fB\f(CWnmcli \-f name,autoconnect con list\fP\fP" +.IP "\fB\f(CWnmcli \-p \-m multiline \-f all con show\fP\fP" .IP -lists all connections' names and their autoconnect settings. +shows all configured connections in multi-line mode. -.IP "\fB\f(CWnmcli con list id \(dq\&My wired connection\(dq\&\fP\fP" +.IP "\fB\f(CWnmcli connection show --active\fP\fP" .IP -lists all details of the connection with "My wired connection" name. +lists all currently active connections. -.IP "\fB\f(CWnmcli \-p con up id \(dq\&My wired connection\(dq\& iface eth0\fP\fP" +.IP "\fB\f(CWnmcli \-f name,autoconnect c s\fP\fP" .IP -activates the connection with name "My wired connection" on interface eth0. +shows all connection profile names and their auto-connect property. + +.IP "\fB\f(CWnmcli \-p connection show \(dq\&My default em1\(dq\&\fP\fP" +.IP +shows details for "My default em1" connection profile. + +.IP "\fB\f(CWnmcli \-f active connection show \(dq\&My default em1\(dq\&\fP\fP" +.IP +shows details for "My default em1" active connection, like IP, DHCP +information, etc. + +.IP "\fB\f(CWnmcli -f profile con s \(dq\&My wired connection\(dq\&\fP\fP" +.IP +shows static configuration details of the connection profile with "My wired connection" name. + +.IP "\fB\f(CWnmcli \-p con up \(dq\&My wired connection\(dq\& ifname eth0\fP\fP" +.IP +activates the connection profile with name "My wired connection" on interface eth0. The \-p option makes nmcli show progress of the activation. -.IP "\fB\f(CWnmcli con up uuid 6b028a27\-6dc9\-4411\-9886\-e9ad1dd43761 ap 00:3A:98:7C:42:D3\fP\fP" +.IP "\fB\f(CWnmcli con up 6b028a27\-6dc9\-4411\-9886\-e9ad1dd43761 ap 00:3A:98:7C:42:D3\fP\fP" .IP connects the Wi\(hyFi connection with UUID 6b028a27\-6dc9\-4411\-9886\-e9ad1dd43761 to the AP with BSSID 00:3A:98:7C:42:D3. -.IP "\fB\f(CWnmcli dev status\fP\fP" +.IP "\fB\f(CWnmcli device status\fP\fP" .IP shows the status for all devices. -.IP "\fB\f(CWnmcli dev disconnect iface em2\fP\fP" +.IP "\fB\f(CWnmcli dev disconnect em2\fP\fP" .IP disconnects a connection on interface em2 and marks the device as unavailable for -auto\(hyconnecting. That's why no connection will automatically be activated on the -device until the device's "autoconnect" is set to TRUE or user manually activates +auto\(hyconnecting. As a result, no connection will automatically be activated on the +device until the device's 'autoconnect' is set to TRUE or the user manually activates a connection. -.IP "\fB\f(CWnmcli \-f GENERAL,WIFI\-PROPERTIES dev list iface wlan0\fP\fP" +.IP "\fB\f(CWnmcli \-f GENERAL,WIFI\-PROPERTIES dev show wlan0\fP\fP" .IP -lists details for wlan0 interface; only GENERAL and WIFI\-PROPERTIES sections will be shown. +shows details for wlan0 interface; only GENERAL and WIFI\-PROPERTIES sections will be shown. .IP "\fB\f(CWnmcli dev wifi\fP\fP" .IP @@ -518,18 +892,63 @@ lists available Wi\(hyFi access points known to NetworkManager. .IP "\fB\f(CWnmcli dev wifi con \(dq\&Cafe Hotspot 1\(dq\& password caffeine name \(dq\&My cafe\(dq\&\fP\fP" .IP creates a new connection named "My cafe" and then connects it to "Cafe Hotspot 1" SSID -using "caffeine" password. This is mainly useful when connecting to "Cafe Hotspot 1" for +using password "caffeine". This is mainly useful when connecting to "Cafe Hotspot 1" for the first time. Next time, it is better to use 'nmcli con up id "My cafe"' so that the existing connection profile can be used and no additional is created. +.IP "\fB\f(CWnmcli connection add type ethernet autoconnect no ifname eth0\fP\fP" +.IP +non-interactively adds an Ethernet connection tied to eth0 interface with automatic IP configuration (DHCP), +and disables the connection's "autoconnect" flag. + +.IP "\fB\f(CWnmcli c a ifname Maxipes\(hyfik type vlan dev eth0 id 55\fP\fP" +.IP +non-interactively adds a VLAN connection with ID 55. The connection will use eth0 and the VLAN interface +will be named Maxipes\(hyfik. + +.IP "\fB\f(CWnmcli connection edit ethernet\-em1\-2\fP\fP" +.IP +edits existing "ethernet\(hyem1\(hy2" connection in the interactive editor. + +.IP "\fB\f(CWnmcli connection edit type ethernet con-name \(dq\&yet another Ethernet connection\(dq\&\fP\fP" +.IP +adds a new Ethernet connection in the interactive editor. + +.IP "\fB\f(CWnmcli con mod ethernet\-2 connection.autoconnect no\fP\fP" +.IP +modifies 'autoconnect' property in the 'connection' setting of 'ethernet\(hy2' connection. + +.IP "\fB\f(CWnmcli con mod \(dq\&Home Wi\-Fi\(dq\& wifi.mtu 1350\fP\fP" +.IP +modifies 'mtu' property in the 'wifi' setting of 'Home Wi\(hyFi' connection. + +.IP "\fB\f(CWnmcli con mod em1-1 ipv4.method manual ipv4.addr \(dq\&192.168.1.23/24 192.168.1.1, 10.10.1.5/8, 10.0.0.11\(dq\&\fP\fP" +.IP +sets manual addressing and the addresses in em1-1 profile. + +.IP "\fB\f(CWnmcli con modify ABC +ipv4.dns 8.8.8.8\fP\fP" +.IP +appends a Google public DNS server to DNS servers in ABC profile. + +.IP "\fB\f(CWnmcli con modify ABC -ipv4.addresses \(dq\&192.168.100.25/24 192.168.1.1\(dq\&\fP\fP" +.IP +removes the specified IP address from (static) profile ABC. + +.SH NOTES +\fInmcli\fP accepts abbreviations, as long as they are a unique prefix in the set +of possible options. As new options get added, these abbreviations are not guaranteed +to stay unique. For scripting and long term compatiblity it is therefore strongly +advised to spell out the full option names. + .SH BUGS There are probably some bugs. If you find a bug, please report it to https://bugzilla.gnome.org/ \(em product \fINetworkManager\fP. .SH SEE ALSO -.BR nm\-tool (1), +.BR nmcli\-examples (5), .BR nm\-online (1), .BR NetworkManager (8), +.BR NetworkManager.conf (5), .BR nm\-settings (5), -.BR nm\applet (1), +.BR nm\-applet (1), .BR nm\-connection\-editor (1). |