From 7514efc2f38c9ace4557d4e69d68e7d380389030 Mon Sep 17 00:00:00 2001
From: Michael Biebl
Servers, headless machines, and terminals: nmcli can
be used to control NetworkManager without a GUI, including creating, editing,
@@ -113,7 +113,7 @@
to a terminal. The default value is auto.
-f | --fields {[field...] | all | common }
-f | --fields { field1,field2... | all | common }
This option is used to specify what fields (column names) should be printed. Valid field names differ for specific commands. List available fields @@ -149,10 +149,9 @@ also influences echoing passwords typed by user as an input.
[
- -w | --wait
- seconds...
- ]
-w | --wait
+ seconds
+
This option sets a timeout period for which nmcli will wait for NetworkManager to finish operations. It is @@ -164,6 +163,17 @@
--complete-args
Instead of conducting the desired action, nmcli + will list possible completions for the last argument. This is useful to implement + argument completion in shell.
+The exit status will indicate success + or return a code 65 to indicate the last argument is a file name.
+NetworkManager ships with command completion support for GNU Bash.
+ -v | --version
Show nmcli version.
logging
[level level]
- [domain domains...]
+ [domains domains...]
Get and change NetworkManager logging level and
domains. Without any argument current logging level and domains are shown. In
order to change logging state, provide level and, or,
domain parameters. See
- NetworkManager.conf(5)
+ NetworkManager.conf(5)
for available level and domain values.
nmcli connection { show | up | down | add | edit | modify | delete | monitor | reload | load } [ARGUMENTS...]
nmcli connection { show | up | down | modify | add | edit | clone | delete | monitor | reload | load | import | export } [ARGUMENTS...]
NetworkManager stores all network configuration as "connections", which are collections of data (Layer2 details, IP addressing, etc.) that describe how to create or connect to a network. A connection is "active" @@ -463,7 +473,7 @@
up
[ id | uuid | path ]
- ID...
+ ID
[ifname ifname]
[ap BSSID]
[passwd-file file]
@@ -563,36 +573,82 @@
+ modify
+ [--temporary]
+ [ id | uuid | path ]
+ ID
+
+ { option value | [+|-]setting.property value }
+ ...
+
Add, modify or remove properties in the connection profile.
+To set the property just specify the property name followed by the
+ value. An empty value ("") removes the property value.
In addition to the properties, you can also use short names for some of + the properties. Consult the Property Aliases + section for details.
+If you want to append an item to the existing value, use
+ + prefix for the property name. If you want to remove just
+ one item from container-type property, use - 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
+ value. The + and -
+ modifies only have a real effect for multi-value (container)
+ properties like ipv4.dns, ipv4.addresses,
+ bond.options, etc.
See nm-settings(5) for complete reference of setting and property names, their descriptions
+ and default values. The setting and
+ property can be abbreviated provided they are unique.
The connection is identified by its name, UUID or D-Bus path. If
+ ID is ambiguous, a keyword id,
+ uuid or path can be used.
add
- ifname ifname
- [con-name name]
- [
- autoconnect
- { yes | no }
- ]
- [
- save
- { yes | no }
- ]
- [master master]
- [slave-type type]
- [type type]
- [ARGUMENTS...]
- [ip4 addr]
- [gw4 addr]
- [ip6 addr]
- [gw6 addr]
- [
- --
-
- [+|-]setting.property
- value
- ...
- ]
+ [save { yes | no }]
+
+ { option value | [+|-]setting.property value }
+ ...
Add a connection for NetworkManager. Arguments differ according to connection types, see below.
+Create a new connection using specified properties.
+You need to describe the newly created connections with the property and value pairs. + See nm-settings(5) for the complete reference. You can also use the aliases described in + Property Aliases section. The syntax is + the same as of the nmcli connection modify command.
+To construct a meaningful connection you at the very least need to set the
+ connection.type property (or use the type alias)
+ to one of known NetworkManager connection types:
ethernet
wifi
wimax
pppoe
gsm
cdma
infiniband
bluetooth
vlan
bond
bond-slave
team
team-slave
bridge
bridge-slave
vpn
olpc-mesh
adsl
tun
ip-tunnel
macvlan
vxlan
The most typical uses are described in the Examples section.
+Aside from the properties and values two special options are accepted:
|
-interface to bind the connection to. The connection will only be
- applicable to this interface name. A special value of |
-||
|
-connection name (when not provided a default name is generated: - <type>[-<ifname>][-<num>]). |
-||
|
-whether the connection profile can be automatically activated (default: - yes). |
-||
|
-whether the connection should be persistent, i.e. NetworkManager should + | Controls whether the connection should be persistent, i.e. NetworkManager should
store it on disk (default: |
|
|
-master interface name, or connection UUID or ID of master connection
- profile. The value can be prefixed with |
-||
|
-type of master connection. Only required when it can not be inferred - (i.e. the master connection does - not exist yet). |
+
|
+If a single |
|
-connection type; see below for allowed values. Note that types
- |
+
- type ethernet
- [mac addr]
- [cloned-mac addr]
- [mtu mtu]
-
|
+ Edit an existing connection or add a new one, using an interactive editor. +The existing connection is identified by its name, UUID or D-Bus path. If
+ 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. +Available options: +
|
+
See also + nm-settings(5) for all NetworkManager settings and property names, and their + descriptions; and + nmcli-examples(7) + for sample editor sessions.
+
- type wifi
- ssid SSID
- [mac addr]
- [cloned-mac addr]
- [
- mode
- { infrastructure | ap | adhoc }
- ]
- [mtu mtu]
-
|
-SSID. |
+ clone
+ [
+ Clone a connection. The connection to be cloned is identified by its
+ name, UUID or D-Bus path. If The new connection profile will be saved as persistent unless
+ |
|
|
-MAC address of the device this connection is locked to. |
+
+ delete
+ [ |
+
+ Delete a configured connection. The connection to be deleted is
+ identified by its name, UUID or D-Bus path. If If |
|
-cloned MAC. |
+
+ monitor
+ [ |
+
+ Monitor connection profile activity. This command prints a line whenever
+ the specified connection changes. The connection to be monitored is identified
+ by its name, UUID or D-Bus path. If Monitors all connection profiles in case none is specified. The command + terminates when all monitored connections disappear. If you want to monitor + connection creation consider using the global monitor with nmcli + monitor command. + |
|
-Wi-Fi network mode. If blank, |
++ reload + |
+Reload all connection files from disk. + NetworkManager does not monitor changes to connection + files by default. So you need to use this command in order to tell + NetworkManager 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 NetworkManager will reload connection + files any time they change (monitor-connection-files=true in + NetworkManager.conf(5)). + |
|
-MTU. |
-
+ load
+ filename...
+
Load/reload one or more connection files from disk. Use this after + manually editing a connection file to ensure that + NetworkManager is aware of its latest state.
- type wimax
- [mac addr]
- [nsp nsp]
-
|
-MAC address of the device this connection is locked to. |
+ import
+ [
+ Import an external/foreign configuration as a NetworkManager connection
+ profile. The type of the input file is specified by Only VPN configurations are supported at the moment. The configuration is
+ imported by NetworkManager VPN plugins. The imported connection profile will be saved as persistent unless
+ |
|
|
-Network Service Provider name. |
+
+ export
+ [ |
+
+ Export a connection. +Only VPN connections are supported at the moment. A proper VPN plugin has
+ to be installed so that nmcli could export a connection. If no
+ |
- type pppoe
- username user
- [password passwd]
- [service name]
- [mtu mtu]
- [mac addr]
-
nmcli device { status | show | set | connect | reapply | modify | disconnect | delete | monitor | wifi | lldp } [ARGUMENTS...]
Show and manage network interfaces.
+
|
-PPPoE username. |
-||
|
-Password for the PPPoE username. |
+status |
+
+ Print status of devices. +This is the default action if no command is specified to + nmcli device. + |
|
-PPPoE service name (if required by concentrator). |
+
+ show
+ [ |
+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. |
|
-MTU. |
+
+ set
+ [ifname]
+ |
+Set device properties. |
|
-MAC address of the device this connection is locked to. |
-
+ connect
+ ifname
+
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.
+If --wait option is not specified, the default timeout will be 90
+ seconds.
- type gsm
- [apn APN]
- [username user]
- [password passwd]
-
|
-APN - GSM Access Point Name. |
+ reapply
+ Attempt to update device with changes to the currently active connection + made since it was last applied. |
|
|
-user name. |
+
+ modify
+ |
+
+ Modify the settings currently active on the device. +This command lets you do temporary changes to a configuration active on + a particular device. The changes are not preserved in the connection profile. +See nm-settings(5) for the list of available properties. Please note that some + properties can't be changed on an already connected device. +You can also use the aliases described in + Property Aliases section. The syntax is + the same as of the nmcli connection modify command. + |
|
-password. |
-
+ disconnect
+ ifname...
+
Disconnect a device and prevent the device from automatically activating + further connections without user/manual intervention. Note that disconnecting + software devices may mean that the devices will disappear.
+If --wait option is not specified, the default timeout
+ will be 10 seconds.
- type cdma
- [username user]
- [password passwd]
-
|
-user name. |
+ delete
+
+ Delete a device. The command removes the interface from the system. Note + that this only works for software devices like bonds, bridges, teams, etc. + Hardware devices (like Ethernet) cannot be deleted by the command. +If |
|
|
-password. |
+
+ monitor
+ [ |
+
+ Monitor device activity. This command prints a line whenever the + specified devices change state. +Monitors all devices in case no interface is specified. The monitor + terminates when all specified devices disappear. If you want to monitor device + addition consider using the global monitor with nmcli + monitor command. + |
+ wifi
+ [
+ list
+ [ifname ifname]
+ [bssid BSSID]
+ ]
+
List available Wi-Fi access points. The ifname and
+ bssid options can be used to list APs for a particular
+ interface or with a specific BSSID, respectively.
- type infiniband
- [mac addr]
- [mtu mtu]
- [
- transport-mode
- { datagram | connected }
- ]
- [parent device]
- [p-key key]
-
|
+ Connect to a Wi-Fi network specified by SSID or BSSID. The command
+ creates a new connection and then activates it on a device. This is a
+ command-line 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-Fi networks. If a connection for the network already exists, it is
+ better to bring up (activate) the existing connection as follows:
+ nmcli con up id If Available options are: +
|
+
|
+if specified, the connection will use the name (else NM creates a name + itself). |
|||||||
- |
-
|
+
- type vlan
- dev device
- id id
- [flags flags]
- [ingress mapping]
- [egress mapping]
- [mtu mtu]
-
|
+ Create a Wi-Fi hotspot. The command creates a hotspot connection profile + according to Wi-Fi device capabilities and activates it on the device. The + hotspot is secured with WPA if device/driver supports that, otherwise WEP is + used. Use connection down or device + disconnect to stop the hotspot. +Parameters of the hotspot can be influenced by the optional + parameters: +
|
+
+ wifi
+ rescan
+ [ifname ifname]
+ [ssid SSID...]
+
Request that NetworkManager immediately re-scan for
+ available access points. NetworkManager scans Wi-Fi networks periodically, but
+ in some cases it can be useful to start scanning manually (e.g. after resuming
+ the computer). By using ssid, it is possible to scan for a
+ specific SSID, which is useful for APs with hidden SSIDs. You can provide
+ multiple ssid parameters in order to scan more
+ SSIDs.
This command does not show the APs, use nmcli device wifi list + for that.
+
- type bond
- [
- mode
- { active-backup | balance-xor | broadcast | 802.3ad | balance-tlb | balance-alb | num }
- ]
- [primary ifname]
- [miimon num]
- [downdelay num]
- [updelay num]
- [arp-interval num]
- [arp-ip-target num]
-
Display information about neighboring devices learned through the Link
+ Layer Discovery Protocol (LLDP). The |
+
+
+
nmcli agent { secret | polkit | all }
Run nmcli as a NetworkManager secret agent, or polkit agent.
+
|
-bonding mode (default: |
+secret |
+Register nmcli as a NetworkManager secret agent and listen for secret + requests. You do usually not need this command, because nmcli can handle + secrets when connecting to networks. However, you may find the command useful + when you use another tool for activating connections and you do not have a + secret agent available (like nm-applet). |
|
-primary interface name (for |
++ polkit + |
+Register nmcli as a polkit agent for the user session and listen for
+ authorization requests. You do not usually need this command, because nmcli can
+ handle polkit actions related to NetworkManager operations (when run with
+ |
|
-miimon (default: |
++ all + |
+Runs nmcli as both NetworkManager secret and a polkit agent. |
Apart from the property-value pairs, connection add, + connection modify and device modify also + accept short forms of some properties. They exist for convenience and compatiblity + with older versions of nmcli that could not accept the raw + properties.
+The overview of the aliases is below. An actual connection type is used to
+ disambiguate these options from the options of the same name that are valid for
+ multiple connection types (such as mtu).
Table 1. Options for all connections
+| Alias | +Property | +Note | +||
|---|---|---|---|---|
|
-downdelay (default: |
+type | +connection.type | +This option also accepts values of bond-slave,
+team-slave and bridge-slave. They create
+ethernet connection profiles. Their use is discouraged in
+favor of using a specific type with master option. |
|
-updelay (default: |
+con-name | +connection.id | +When not provided a default name is generated: <type>[-<ifname>][-<num>]). |
|
-ARP interval (default: |
+autoconnect | +connection.autoconnect | +|
|
-ARP IP target. |
+ifname | +connection.interface-name | +A value of * will be interpreted as
+no value, making the connection profile interface-independent.
+Note: use quotes around * to suppress shell expansion.
+For bond, team and bridge connections a default name will be generated if not set. |
ifname/, uuid/
+or id/ to disambiguate it.
- type bond-slave
- [master master]
-
| slave-type | +connection.slave-type | ++ + + |
- type team
- [
- config
- { file | JSON }
- ]
-
|
-JSON configuration for team. |
-
- type team-slave
- [
- config
-
- ]
- JSON
| Alias | +Property | +||
|---|---|---|---|
|
-master team interface name, or connection UUID or
- ID of team master connection profile. The value can be
- prefixed with |
+username | +pppoe.username |
|
-JSON configuration for team. |
-
- type bridge
- [
- stp
- { yes | no }
- ]
- [priority num]
- [forward-delay 2-30]
- [hello-time 1-10]
- [max-age 6-42]
- [ageing-time 0-1000000]
- [
- multicast-snooping
- { yes | no }
- ]
- [mac addr]
-
| service | +pppoe.service | + + +
Table 3. Wired Ethernet options
+| Alias | +Property | +||
|---|---|---|---|
|
-controls whether Spanning Tree Protocol (STP) is enabled for this bridge
- (default: |
+mtu | +wired.mtu |
|
-sets STP priority (default: |
+mac | +wired.mac-address |
|
-STP forwarding delay, in seconds (default: |
+cloned-mac | +wired.cloned-mac-address |
Table 4. Infiniband options
+| Alias | +Property | +||
|---|---|---|---|
|
-STP hello time, in seconds (default: |
+mtu | +infiniband.mtu |
|
-STP maximum message age, in seconds (default: |
+mac | +infiniband.mac-address |
|
-the Ethernet MAC address aging time, in seconds (default: |
+transport-mode | +infiniband.transport-mode |
|
-controls whether IGMP snooping is enabled (default: |
+parent | +infiniband.parent |
|
-MAC address of the bridge (note: this requires a recent kernel feature, - originally introduced in 3.15 upstream kernel). |
+p-key | +infiniband.p-key |
- type bridge-slave
- [master master]
- [priority num]
- [path-cost 1-65535]
- [
- hairpin
- { yes | no }
- ]
-
Table 5. Wi-Fi options
+| Alias | +Property | +||
|---|---|---|---|
|
-master bridge interface name, or connection UUID
- or ID of bridge master connection profile. The value
- can be prefixed with |
+ssid | +wireless.ssid |
|
-STP priority of this slave (default: |
+mode | +wireless.mode |
|
-STP port cost for destinations via this slave (default: |
+mtu | +wireless.mtu |
|
-'hairpin mode' for the slave, which allows frames to be sent back out
- through the slave the frame was received on (default: |
-
- type vpn
- [type type]
- [user username]
-
| cloned-mac | +wireless.cloned-mac-address | + + +
Table 6. WiMax options
+| Alias | +Property | +||
|---|---|---|---|
|
-VPN type. |
+nsp | +wimax.network-name |
|
-VPN username. |
+mac | +wimax.mac-address |
- type olpc-mesh
- ssid SSID
- [channel 1-13]
- [dhcp-anycast MAC]
-
Table 7. GSM options
+| Alias | +Property | +||
|---|---|---|---|
|
-SSID. |
+apn | +gsm.apn |
|
-channel to use for the network. |
+user | +gsm.username |
|
-anycast DHCP MAC address used when requesting an IP address via DHCP. |
+password | +gsm.password |
- type adsl
- username username
-
- protocol
- { pppoa | pppoe | ipoatm }
-
- [password passwd]
- [
- encapsulation
- { vcmux | llc }
- ]
-
Table 8. CDMA options
+| Alias | +Property | +||
|---|---|---|---|
|
-ADSL user name. |
+user | +cdma.username |
|
-ADSL protocol. |
-||
|
-ADSL password. |
-||
|
-ADSL encapsulation. |
+password | +cdma.password |
- type tun
-
- mode
- { tun | tap }
-
- [owner UID]
- [group GID]
- [
- pi
- { yes | no }
- ]
- [
- vnet-hdr
- { yes | no }
- ]
- [
- multi-queue
- { yes | no }
- ]
-
Table 9. Bluetooth options
+| Alias | +Property | +Note | +||
|---|---|---|---|---|
|
-Mode for the device. |
-|||
|
-UID of the owner. |
-|||
|
-GID of the group. |
+addr | +bluetooth.bdaddr | +|
|
-include packet information (~IFF_NO_PI flag). |
-|||
|
-send and receive large (i.e. GSO) packets and packets with partial - checksums (IFF_VNET_HDR flag). |
-|||
|
-multi-queue support for tun/tap device (IFF_MULTI_QUEUE flag). |
+bt-type | +bluetooth.type | +Apart from the usual dun and
+panu options, the values of dun-gsm
+and dun-cdma can be used for compatibility with older
+versions. They are equivalent to using dun and setting
+appropriate gsm.* or cdma.* properties. |
- type ip-tunnel
-
- mode
- { ipip | gre | sit | isatap | vti | ip6ip6 | ipip6 | ip6gre | vti6 | tun }
-
- remote addr
- [local addr]
- [dev device]
-
Table 10. VLAN options
+| Alias | +Property | +||
|---|---|---|---|
|
-tunnel mode. |
+dev | +vlan.parent |
|
-IPv4 or IPv6 address of the remote tunnel endpoint. |
+id | +vlan.id |
|
-IPv4 or IPv6 address of the local tunnel endpoint. |
+flags | +vlan.flags |
|
-device to use for tunnel endpoint communication. |
-
- type macvlan
- dev device
-
- mode
- { vepa | bridge | private | passthru | source }
-
- [
- tap
- { yes | no }
- ]
-
| egress | +vlan.egress-priority-map | + + +
Table 11. Bonding options
+| Alias | +Property | +Note | +
|---|---|---|
|
-parent device this MACVLAN is on. |
-|
|
-MACVLAN mode, which specifies the communication mechanism between - multiple MACVLANs on the same lower device. |
-|
|
-controls the device type. If set to 'yes' a MACVTAP will be created
- (default: |
-mode | +bond.options | +Setting each of these adds the option to bond.options property.
+It's equivalent of using the +bond.options 'option=value' syntax. |
+
+
| primary | ||
| miimon | ||
| downdelay | ||
| updelay | ||
| arp-interval | ||
| arp-ip-target | ||
| lacp-rate |
- type vxlan
- id id
- remote addr
- [dev parent device (ifname or connection UUID)]
- [local addr]
- [source-port-min 0-65535]
- [source-port-max 0-65535]
- [destination-port 0-65535]
-
Table 14. Bridge options
+| Alias | +Property | +||
|---|---|---|---|
|
-VXLAN Network Identifer to use. |
+stp | +bridge.stp |
|
-unicast destination IP address or multicast IP address to join. |
+priority | +bridge.priority |
|
-device to use for tunnel endpoint communication. |
+forward-delay | +bridge.forward-delay |
|
-source IP address. |
+hello-time | +bridge.hello-time |
|
-minimum UDP source port to communicate to the remote VXLAN tunnel endpoint. |
+max-age | +bridge.max-age |
|
-maximum UDP source port to communicate to the remote VXLAN tunnel endpoint. |
+ageing-time | +bridge.ageing-time |
|
-UDP destination port to communicate to the remote VXLAN tunnel endpoint. |
+multicast-snooping | +bridge.multicast-snooping |
ip4, gw4
IPv4 addresses.
ip6, gw6
IPv6 addresses.
--
If a -- argument is encountered, the rest of command
- line is interpreted as property list in the same format as connection
- modify command accepts. This makes it possible to adjust the
- connection properties before it's added.
- edit
- {
- [ id | uuid | path ]
- ID...
- |
- [type type]
- [con-name name]
- }
-
Edit an existing connection or add a new one, using an interactive editor.
-The existing connection is identified by its name, UUID or D-Bus path. If
- ID is ambiguous, a keyword id,
- uuid, or path can be used. See
- connection show above for the description of the
- ID-specifying keywords. Not providing an
- ID means that a new connection will be added.
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.
-Available options:
-| Alias | +Property | +||
|---|---|---|---|
|
-type of the new connection; valid types are the same as for - connection add command. |
+vpn-type | +vpn.service-type |
|
-name for the new connection. It can be changed later in the editor. |
-
See also - nm-settings(5) for all NetworkManager settings and property names, and their - descriptions; and - nmcli-examples(7) - for sample editor sessions.
- - -
- modify
- [--temporary]
- [ id | uuid | path ]
- ID
-
- [+|-]setting.property
- value
- ...
-
Modify one or more properties in the connection profile.
-The connection is identified by its name, UUID or D-Bus path. If
- ID is ambiguous, a keyword id,
- uuid or path can be used. See
- nm-settings(5) for setting and property names, their descriptions and default
- values. This command supports abbreviations for setting
- and property provided they are unique. Empty
- value ("") removes the property value (sets
- the property to the default value). The provided value overwrites the existing
- property value.
If you want to append an item to the existing value, use
- + prefix for the property name. If you want to remove just
- one item from container-type property, use - 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
- value. Of course, + and
- - only have a real effect for multi-value (container)
- properties like ipv4.dns, ipv4.addresses,
- bond.options, etc.
- clone
- [--temporary]
- [ id | uuid | path ]
- ID...
- new name
-
Clone a connection. The connection to be cloned is identified by its
- name, UUID or D-Bus path. If ID is ambiguous, a keyword
- id, uuid or path
- can be used. See connection show above for the description
- of the ID-specifying keywords. name is
- the name of the new cloned connection. The new connection will be the exact
- copy except the connection.id (name) and
- connection.uuid (generated) properties.
The new connection profile will be saved as persistent unless
- --temporary option is specified, in which case the new profile
- won't exist after NetworkManager restart.
- delete
- [ id | uuid | path ]
- ID...
-
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 id, uuid or path can be used.
- See connection show above for the description of
- the ID-specifying keywords.
If --wait option is not specified, the default timeout will be 10
- seconds.
- monitor
- [ id | uuid | path ]
- ID...
-
Monitor connection profile activity. This command prints a line whenever
- the specified connection changes. The connection to be monitored is identified
- by its name, UUID or D-Bus path. If ID is ambiguous, a keyword
- id, uuid or path
- can be used. See connection show above for the description of the
- ID-specifying keywords.
Monitors all connection profiles in case none is specified. The command - terminates when all monitored connections disappear. If you want to monitor - connection creation consider using the global monitor with nmcli - monitor command.
-- reload -
Reload all connection files from disk. - NetworkManager does not monitor changes to connection - files by default. So you need to use this command in order to tell - NetworkManager 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 NetworkManager will reload connection - files any time they change (monitor-connection-files=true in - NetworkManager.conf(5)). -
- load
- filename...
-
Load/reload one or more connection files from disk. Use this after - manually editing a connection file to ensure that - NetworkManager is aware of its latest state.
- import
- [--temporary]
- [type type]
- [file file]
-
Import an external/foreign configuration as a NetworkManager connection
- profile. The type of the input file is specified by type
- option.
Only VPN configurations are supported at the moment. The configuration is
- imported by NetworkManager VPN plugins. type values are
- the same as for vpn-type option in nmcli
- connection add. VPN configurations are imported by VPN plugins.
- Therefore the proper VPN plugin has to be installed so that nmcli could import
- the data.
The imported connection profile will be saved as persistent unless
- --temporary option is specified, in which case the new profile
- won't exist after NetworkManager restart.
- export
- [ id | uuid | path ]
- ID
- [file]
-
Export a connection.
-Only VPN connections are supported at the moment. A proper VPN plugin has
- to be installed so that nmcli could export a connection. If no
- file is provided, the VPN configuration
- data will be printed to standard output.
nmcli device { status | show | set | connect | reapply | disconnect | delete | monitor | wifi | lldp } [ARGUMENTS...]
Show and manage network interfaces.
-| Alias | +Property | +||
|---|---|---|---|
status |
-
- Print status of devices. -This is the default action if no command is specified to - nmcli device. - |
+ssid | +olpc-mesh.ssid |
- show
- [ |
-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. |
+channel | +olpc-mesh.channel |
- set
- [ifname]
- |
-Set device properties. |
+dhcp-anycast | +olpc-mesh.dhcp-anycast-address |
- connect
- [ |
-
- 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. -If |
+
Table 17. ADSL options
+| Alias | +Property | +||
|---|---|---|---|
| username | +adsl.username | ||
- reapply
- [ |
-Attempt to update device with changes to the currently active connection - made since it was last applied. |
+protocol | +adsl.protocol |
- disconnect
- [ |
-
- Disconnect a device and prevent the device from automatically activating - further connections without user/manual intervention. Note that disconnecting - software devices may mean that the devices will disappear. -If |
+password | +adsl.password |
- delete
- [ |
-
- Delete a device. The command removes the interface from the system. Note - that this only works for software devices like bonds, bridges, teams, etc. - Hardware devices (like Ethernet) cannot be deleted by the command. -If |
+encapsulation | +adsl.encapsulation |
Table 18. MACVLAN options
+| Alias | +Property | +|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- monitor
- [ |
-
- Monitor device activity. This command prints a line whenever the - specified devices change state. -Monitors all devices in case no interface is specified. The monitor - terminates when all specified devices disappear. If you want to monitor device - addition consider using the global monitor with nmcli - monitor command. - |
+dev | +macvlan.parent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- wifi
- [
- list
- [ |
-List available Wi-Fi access points. The |
+mode | +macvlan.mode | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- wifi
- connect
- |
-
- Connect to a Wi-Fi network specified by SSID or BSSID. The command
- creates a new connection and then activates it on a device. This is a
- command-line 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-Fi networks. If a connection for the network already exists, it is
- better to bring up (activate) the existing connection as follows:
- nmcli con up id If Available options are: -
+ Table 19. VxLAN options +
|
-|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- wifi
- hotspot
- [ |
-
- Create a Wi-Fi hotspot. The command creates a hotspot connection profile - according to Wi-Fi device capabilities and activates it on the device. The - hotspot is secured with WPA if device/driver supports that, otherwise WEP is - used. Use connection down or device - disconnect to stop the hotspot. -Parameters of the hotspot can be influenced by the optional - parameters: -
+
-Table 21. IP tunneling options +
-
@@ -2076,7 +2023,7 @@
Secret Agent-
Run nmcli as a NetworkManager secret agent, or polkit agent. -
+
+Table 23. IPv6 options +
+ ExamplesThis section presents various examples of nmcli usage. If you want even more, please refer to - nmcli-examples(7) + nmcli-examples(7) manual page.
|