NetworkManager.conf is the configuration file for NetworkManager. It is used
to set up various aspects of NetworkManager's behavior. The
location of the main file and configuration directories may be changed
@@ -66,7 +66,7 @@
-
File Format
+
File Format
The configuration file format is so-called key file (sort of
ini-style format). It consists of sections (groups) of
@@ -103,7 +103,7 @@ plugins-=remove-me
-
+
main section
@@ -148,7 +148,13 @@ plugins-=remove-me
the connection files at startup, and when explicitly requested
via the ReloadConnections D-Bus call. If this key is set to
'true', then NetworkManager will reload
- connection files any time they changed.
+ connection files any time they changed.
+ Automatic reloading is not advised because there are race conditions
+ involved and it depends on the way how the editor updates the file.
+ In some situations, NetworkManager might first delete and add the
+ connection anew, instead of updating the existing one. Also, NetworkManager
+ might pick up incomplete settings while the user is still editing the files.
+
auth-polkit
@@ -324,7 +330,7 @@ no-auto-default=*
sensitive information such as passwords or configuration settings.
- fatal-warnings: set g_log_set_always_fatal()
+ fatal-warnings: set g_log_set_always_fatal()
to core dump on warning messages from glib. This is equivalent
to the --g-fatal-warnings command line option.
@@ -334,7 +340,7 @@ no-auto-default=*
-
+
keyfile section
This section contains keyfile-plugin-specific options, and
is normally only used when you are not using any other
@@ -386,7 +392,7 @@ unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth
-
+
ifupdown section
This section contains ifupdown-specific options and thus only
has effect when using the ifupdown plugin.
This section controls NetworkManager's logging. Any
settings here are overridden by the --log-level
@@ -493,7 +499,7 @@ unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth
-
+
connection section
Specify default values for connections.
@@ -507,7 +513,7 @@ ipv6.ip6-privacy=0
-
Supported Properties
+
Supported Properties
Not all properties can be overwritten, only the following
properties are supported to have their default values configured
@@ -576,7 +582,7 @@ ipv6.ip6-privacy=0
-
Sections
+
Sections
You can configure multiple connection
sections, by having different sections with a name that all start
@@ -654,7 +660,7 @@ ipv6.ip6-privacy=1
-
+
connectivity section
This section controls NetworkManager's optional connectivity
checking functionality. This allows NetworkManager to detect
@@ -700,7 +706,7 @@ ipv6.ip6-privacy=1
-
+
global-dns section
This section specifies global DNS settings that override
connection-specific configuration.
@@ -730,7 +736,7 @@ ipv6.ip6-privacy=1
-
+
global-dns-domain sections
Sections with a name starting with the "global-dns-domain-"
prefix allow to define global DNS configuration for specific
@@ -766,7 +772,7 @@ ipv6.ip6-privacy=1
-
+
.config sections
This is a special section that contains options which apply
to the configuration file that contains the option.
@@ -869,7 +875,7 @@ enable=nm-version-min:1.3,nm-version-min:1.2.6,nm-version-min:1.0.16
The maximum bitrate this access point is capable of, in kilobits/second (Kb/s).
+
The maximum bitrate this access point is capable of, in kilobits/second
+ (Kb/s).
+
@@ -149,7 +168,8 @@ MaxBitrate readable u
Strength readable y
-
The current signal quality of the access point, in percent.
+
The current signal quality of the access point, in percent.
+
@@ -157,7 +177,10 @@ Strength readable y
LastSeen readable i
-
The timestamp (in CLOCK_BOOTTIME seconds) for the last time the access point was found in scan results. A value of -1 means the access point has never been found in scan results.
+
The timestamp (in CLOCK_BOOTTIME seconds) for the last time the access
+ point was found in scan results. A value of -1 means the access point has
+ never been found in scan results.
+
Called by secret Agents to register their ability to provide and save network secrets.
+
Called by secret Agents to register their ability to provide and save
+ network secrets.
+
@@ -59,18 +61,19 @@ Register (IN s identifier);
IN s identifier:
-
Identifies this agent; only one agent in each user session may use the same identifier. Identifier formatting follows the same rules as D-Bus bus names with the exception that the ':' character is not allowed. The valid set of characters is "[A-Z][a-z][0-9]_-." and the identifier is limited in length to 255 characters with a minimum of 3 characters. An example valid identifier is 'org.gnome.nm-applet' (without quotes).
+
Identifies this agent; only one agent in each user session may use the same identifier. Identifier formatting follows the same rules as D-Bus bus names with the exception that the ':' character is not allowed. The valid set of characters is "[A-Z][a-z][0-9]_-." and the identifier is limited in length to 255 characters with a minimum of 3 characters. An example valid identifier is 'org.gnome.nm-applet' (without quotes).
-
The RegisterWithCapabilities() method
+
The RegisterWithCapabilities() method
RegisterWithCapabilities (IN s identifier,
IN u capabilities);
-
Like Register() but indicates agent capabilities to NetworkManager.
+
Like Register() but indicates agent capabilities to NetworkManager.
+
@@ -79,22 +82,25 @@ RegisterWithCapabilities (IN s identifier,
IN s identifier:
-
See the Register() method's identifier argument.
+
See the Register() method's identifier argument.
IN u capabilities:
-
Indicates various agent capabilities to NetworkManager.
Called by secret Agents to notify NetworkManager that they will no longer handle requests for network secrets. Agents are automatically unregistered when they disconnect from D-Bus.
+
Called by secret Agents to notify NetworkManager that they will no longer
+ handle requests for network secrets. Agents are automatically unregistered
+ when they disconnect from D-Bus.
+
Objects that implement the Connection.Active interface represent an attempt to connect to a network using the details provided by a Connection object. The Connection.Active object tracks the life-cycle of the connection attempt and if successful indicates whether the connected network is the "default" or preferred network for access. NetworkManager has the concept of connections, which can be thought of as settings, a profile or a configuration that can be applied on a networking device. Such settings-connections are exposed as D-Bus object and the active-connection expresses this relationship between device and settings-connection. At any time a settings-connection can only be activated on one device and vice versa. However, during activation and deactivation multiple active-connections can reference the same device or settings-connection as they are waiting to be activated or to be deactivated.
+
Objects that implement the Connection.Active interface represent an
+ attempt to connect to a network using the details provided by a Connection
+ object. The Connection.Active object tracks the life-cycle of the
+ connection attempt and if successful indicates whether the connected
+ network is the "default" or preferred network for access. NetworkManager
+ has the concept of connections, which can be thought of as settings, a
+ profile or a configuration that can be applied on a networking device.
+ Such settings-connections are exposed as D-Bus object and the
+ active-connection expresses this relationship between device and
+ settings-connection. At any time a settings-connection can only be
+ activated on one device and vice versa. However, during activation and
+ deactivation multiple active-connections can reference the same device or
+ settings-connection as they are waiting to be activated or to be
+ deactivated.
+
A specific object associated with the active connection. This property reflects the specific object used during connection activation, and will not change over the lifetime of the ActiveConnection once set.
+
A specific object associated with the active connection. This property
+ reflects the specific object used during connection activation, and will
+ not change over the lifetime of the ActiveConnection once set.
+
@@ -106,7 +124,9 @@ SpecificObject readable o
Id readable s
-
The ID of the connection, provided as a convenience so that clients do not have to retrieve all connection details.
+
The ID of the connection, provided as a convenience so that clients do not
+ have to retrieve all connection details.
+
@@ -114,7 +134,9 @@ Id readable s
Uuid readable s
-
The UUID of the connection, provided as a convenience so that clients do not have to retrieve all connection details.
+
The UUID of the connection, provided as a convenience so that clients do
+ not have to retrieve all connection details.
+
@@ -122,7 +144,9 @@ Uuid readable s
Type readable s
-
The type of the connection, provided as a convenience so that clients do not have to retrieve all connection details.
+
The type of the connection, provided as a convenience so that clients do
+ not have to retrieve all connection details.
+
@@ -130,7 +154,9 @@ Type readable s
Devices readable ao
-
Array of object paths representing devices which are part of this active connection.
+
Array of object paths representing devices which are part of this active
+ connection.
+
Whether this active connection is the default IPv4 connection, i.e. whether it currently owns the default IPv4 route.
+
Whether this active connection is the default IPv4 connection, i.e.
+ whether it currently owns the default IPv4 route.
+
@@ -154,7 +185,10 @@ Default readable b
Ip4Config readable o
-
Object path of the Ip4Config object describing the configuration of the connection. Only valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
+
Object path of the Ip4Config object describing the configuration of the
+ connection. Only valid when the connection is in the
+ NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
+
@@ -162,7 +196,10 @@ Ip4Config readable o
Dhcp4Config readable o
-
Object path of the Dhcp4Config object describing the DHCP options returned by the DHCP server (assuming the connection used DHCP). Only valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
+
Object path of the Dhcp4Config object describing the DHCP options returned
+ by the DHCP server (assuming the connection used DHCP). Only valid when
+ the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
+
@@ -170,7 +207,9 @@ Dhcp4Config readable o
Default6 readable b
-
Whether this active connection is the default IPv6 connection, i.e. whether it currently owns the default IPv6 route.
+
Whether this active connection is the default IPv6 connection, i.e.
+ whether it currently owns the default IPv6 route.
+
@@ -178,7 +217,10 @@ Default6 readable b
Ip6Config readable o
-
Object path of the Ip6Config object describing the configuration of the connection. Only valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
+
Object path of the Ip6Config object describing the configuration of the
+ connection. Only valid when the connection is in the
+ NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
+
@@ -186,7 +228,10 @@ Ip6Config readable o
Dhcp6Config readable o
-
Object path of the Dhcp6Config object describing the DHCP options returned by the DHCP server (assuming the connection used DHCP). Only valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
+
Object path of the Dhcp6Config object describing the DHCP options returned
+ by the DHCP server (assuming the connection used DHCP). Only valid when
+ the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
+
@@ -194,7 +239,8 @@ Dhcp6Config readable o
Vpn readable b
-
Whether this active connection is also a VPN connection.
+
Whether this active connection is also a VPN connection.
+
@@ -202,7 +248,8 @@ Vpn readable b
Master readable o
-
The path to the master device if the connection is a slave.
+
The path to the master device if the connection is a slave.
+
The generic family of access technologies the modem supports. Not all capabilities are available at the same time however; some modems require a firmware reload or other reinitialization to switch between eg CDMA/EVDO and GSM/UMTS.
+
The generic family of access technologies the modem supports. Not all
+ capabilities are available at the same time however; some modems require a
+ firmware reload or other reinitialization to switch between eg CDMA/EVDO
+ and GSM/UMTS.
+
Emitted when an NSP disappears from view of the device.
+
Emitted when an NSP disappears from view of the device.
+
@@ -147,7 +151,9 @@ NspRemoved (o nsp);
Nsps readable ao
-
List of object paths of Network Service Providers (NSPs) visible to this WiMAX device.
+
List of object paths of Network Service Providers (NSPs) visible to this
+ WiMAX device.
+
@@ -155,7 +161,8 @@ Nsps readable ao
HwAddress readable s
-
Hardware address of the device.
+
Hardware address of the device.
+
@@ -163,7 +170,10 @@ HwAddress readable s
CenterFrequency readable u
-
Center frequency (in KHz) of the radio channel the device is using to communicate with the network when connected. Has no meaning when the device is not connected.
+
Center frequency (in KHz) of the radio channel the device is using to
+ communicate with the network when connected. Has no meaning when the
+ device is not connected.
+
@@ -171,7 +181,11 @@ CenterFrequency readable u
Rssi readable i
-
RSSI of the current radio link in dBm. This value indicates how strong the raw received RF signal from the base station is, but does not indicate the overall quality of the radio link. Has no meaning when the device is not connected.
+
RSSI of the current radio link in dBm. This value indicates how strong the
+ raw received RF signal from the base station is, but does not indicate the
+ overall quality of the radio link. Has no meaning when the device is not
+ connected.
+
@@ -179,7 +193,10 @@ Rssi readable i
Cinr readable i
-
CINR (Carrier to Interference + Noise Ratio) of the current radio link in dB. CINR is a more accurate measure of radio link quality. Has no meaning when the device is not connected.
+
CINR (Carrier to Interference + Noise Ratio) of the current radio link in
+ dB. CINR is a more accurate measure of radio link quality. Has no meaning
+ when the device is not connected.
+
@@ -187,7 +204,10 @@ Cinr readable i
TxPower readable i
-
Average power of the last burst transmitted by the device, in units of 0.5 dBm. i.e. a TxPower of -11 represents an actual device TX power of -5.5 dBm. Has no meaning when the device is not connected.
+
Average power of the last burst transmitted by the device, in units of 0.5
+ dBm. i.e. a TxPower of -11 represents an actual device TX power of -5.5
+ dBm. Has no meaning when the device is not connected.
+
@@ -195,7 +215,9 @@ TxPower readable i
Bsid readable s
-
The ID of the serving base station as received from the network. Has no meaning when the device is not connected.
+
The ID of the serving base station as received from the network. Has no
+ meaning when the device is not connected.
+
@@ -203,7 +225,8 @@ Bsid readable s
ActiveNsp readable o
-
Object path of the NSP currently used by the WiMax device.
+
Object path of the NSP currently used by the WiMax device.
+
DEPRECATED. Get the list of access points visible to this device. Note that this list does not include access points which hide their SSID. To retrieve a list of all access points (including hidden ones) use the GetAllAccessPoints() method.
+
DEPRECATED. Get the list of access points visible to this device. Note
+ that this list does not include access points which hide their SSID. To
+ retrieve a list of all access points (including hidden ones) use the
+ GetAllAccessPoints() method.
+
@@ -86,11 +90,13 @@ GetAccessPoints (OUT ao access_points);
-
The GetAllAccessPoints() method
+
The GetAllAccessPoints() method
GetAllAccessPoints (OUT ao access_points);
-
Get the list of all access points visible to this device, including hidden ones for which the SSID is not yet known.
+
Get the list of all access points visible to this device, including hidden
+ ones for which the SSID is not yet known.
+
@@ -104,11 +110,12 @@ GetAllAccessPoints (OUT ao access_points);
-
The RequestScan() method
+
The RequestScan() method
RequestScan (IN a{sv} options);
-
Request the device to scan
+
Request the device to scan
+
@@ -116,7 +123,7 @@ RequestScan (IN a{sv} options);
IN a{sv} options:
-
Options of scan. Currently 'ssids' option with value of "aay" type is supported.
+
Options of scan. Currently 'ssids' option with value of "aay" type is supported.
@@ -128,7 +135,8 @@ RequestScan (IN a{sv} options);
PropertiesChanged (a{sv} properties);
-
Emitted when the wireless device's properties changed.
+
Emitted when the wireless device's properties changed.
+
Reapply (IN a{sa{sv}} connection,
IN t version_id,
IN u flags);
-
Attempts to update the configuration of a device without deactivating it. NetworkManager has the concept of connections, which are profiles that contain the configuration for a networking device. Those connections are exposed via D-Bus as individual objects that can be created, modified and deleted. When activating such a settings-connection on a device, the settings-connection is cloned to become an applied-connection and used to configure the device (see GetAppliedConnection). Subsequent modification of the settings-connection don't propagate automatically to the device's applied-connection (with exception of the firewall-zone and the metered property). For the changes to take effect, you can either re-activate the settings-connection, or call Reapply. The Reapply call allows you to directly update the applied-connection and reconfigure the device. Reapply can also be useful if the currently applied-connection is equal to the connection that is about to be reapplied. This allows to reconfigure the device and revert external changes like removing or adding an IP address (which NetworkManager doesn't revert automatically because it is assumed that the user made these changes intentionally outside of NetworkManager). Reapply can make the applied-connection different from the settings-connection, just like updating the settings-connection can make them different.
+
Attempts to update the configuration of a device without deactivating it.
+ NetworkManager has the concept of connections, which are profiles that
+ contain the configuration for a networking device. Those connections are
+ exposed via D-Bus as individual objects that can be created, modified and
+ deleted. When activating such a settings-connection on a device, the
+ settings-connection is cloned to become an applied-connection and used to
+ configure the device (see GetAppliedConnection). Subsequent modification
+ of the settings-connection don't propagate automatically to the device's
+ applied-connection (with exception of the firewall-zone and the metered
+ property). For the changes to take effect, you can either re-activate the
+ settings-connection, or call Reapply. The Reapply call allows you to
+ directly update the applied-connection and reconfigure the device. Reapply
+ can also be useful if the currently applied-connection is equal to the
+ connection that is about to be reapplied. This allows to reconfigure the
+ device and revert external changes like removing or adding an IP address
+ (which NetworkManager doesn't revert automatically because it is assumed
+ that the user made these changes intentionally outside of NetworkManager).
+ Reapply can make the applied-connection different from the
+ settings-connection, just like updating the settings-connection can make
+ them different.
+
@@ -107,28 +127,35 @@ Reapply (IN a{sa{sv}} connection,
IN a{sa{sv}} connection:
-
The optional connection settings that will be reapplied on the device. If empty, the currently active settings-connection will be used. The connection cannot arbitrarly differ from the current applied-connection otherwise the call will fail. Only certain changes are supported, like adding or removing IP addresses.
+
The optional connection settings that will be reapplied on the device. If empty, the currently active settings-connection will be used. The connection cannot arbitrarly differ from the current applied-connection otherwise the call will fail. Only certain changes are supported, like adding or removing IP addresses.
IN t version_id:
-
If non-zero, the current version id of the applied-connection must match. The current version id can be retrieved via GetAppliedConnection. This optional argument allows to catch concurrent modifications between the GetAppliedConnection call and Reapply.
+
If non-zero, the current version id of the applied-connection must match. The current version id can be retrieved via GetAppliedConnection. This optional argument allows to catch concurrent modifications between the GetAppliedConnection call and Reapply.
IN u flags:
-
Flags which would modify the behavior of the Reapply call. There are no flags defined currently and the users should use the value of 0.
+
Flags which would modify the behavior of the Reapply call. There are no flags defined currently and the users should use the value of 0.
-
The GetAppliedConnection() method
+
The GetAppliedConnection() method
GetAppliedConnection (IN u flags,
OUT a{sa{sv}} connection,
OUT t version_id);
-
Get the currently applied connection on the device. This is a snapshot of the last activated connection on the device, that is the configuration that is currently applied on the device. Usually this is the same as GetSettings of the referenced settings connection. However, it can differ if the settings connection was subsequently modified or the applied connection was modified by Reapply. The applied connection is set when activating a device or when calling Reapply.
+
Get the currently applied connection on the device. This is a snapshot of
+ the last activated connection on the device, that is the configuration
+ that is currently applied on the device. Usually this is the same as
+ GetSettings of the referenced settings connection. However, it can differ
+ if the settings connection was subsequently modified or the applied
+ connection was modified by Reapply. The applied connection is set when
+ activating a device or when calling Reapply.
+
@@ -137,7 +164,7 @@ GetAppliedConnection (IN u flags,
IN u flags:
-
Flags which would modify the behavior of the GetAppliedConnection call. There are no flags defined currently and the users should use the value of 0.
+
Flags which would modify the behavior of the GetAppliedConnection call. There are no flags defined currently and the users should use the value of 0.
OUT a{sa{sv}} connection:
@@ -145,26 +172,31 @@ GetAppliedConnection (IN u flags,
OUT t version_id:
-
The version-id of the currently applied connection. This can be specified during Reapply to avoid races where you first fetch the applied connection, modify it and try to reapply it. If the applied connection is modified in the meantime, the version_id gets incremented and Reapply will fail.
+
The version-id of the currently applied connection. This can be specified during Reapply to avoid races where you first fetch the applied connection, modify it and try to reapply it. If the applied connection is modified in the meantime, the version_id gets incremented and Reapply will fail.
-
The Disconnect() method
+
The Disconnect() method
Disconnect ();
-
Disconnects a device and prevents the device from automatically activating further connections without user intervention.
+
Disconnects a device and prevents the device from automatically activating
+ further connections without user intervention.
+
-
The Delete() method
+
The Delete() method
Delete ();
-
Deletes a software device from NetworkManager and removes the interface from the system. The method returns an error when called for a hardware device.
+
Deletes a software device from NetworkManager and removes the interface
+ from the system. The method returns an error when called for a hardware
+ device.
+
Operating-system specific transient device hardware identifier. This is an opaque string representing the underlying hardware for the device, and shouldn't be used to keep track of individual devices. For some device types (Bluetooth, Modems) it is an identifier used by the hardware service (ie bluez or ModemManager) to refer to that device, and client programs use it get additional information from those services which NM does not provide. The Udi is not guaranteed to be consistent across reboots or hotplugs of the hardware. If you're looking for a way to uniquely track each device in your application, use the object path. If you're looking for a way to track a specific piece of hardware across reboot or hotplug, use a MAC address or USB serial number.
+
Operating-system specific transient device hardware identifier. This is an
+ opaque string representing the underlying hardware for the device, and
+ shouldn't be used to keep track of individual devices. For some device
+ types (Bluetooth, Modems) it is an identifier used by the hardware service
+ (ie bluez or ModemManager) to refer to that device, and client programs
+ use it get additional information from those services which NM does not
+ provide. The Udi is not guaranteed to be consistent across reboots or
+ hotplugs of the hardware. If you're looking for a way to uniquely track
+ each device in your application, use the object path. If you're looking
+ for a way to track a specific piece of hardware across reboot or hotplug,
+ use a MAC address or USB serial number.
+
@@ -214,7 +257,8 @@ Udi readable s
Interface readable s
-
The name of the device's control (and often data) interface.
+
The name of the device's control (and often data) interface.
+
@@ -222,7 +266,11 @@ Interface readable s
IpInterface readable s
-
The name of the device's data interface when available. This property may not refer to the actual data interface until the device has successfully established a data connection, indicated by the device's State becoming ACTIVATED.
+
The name of the device's data interface when available. This property may
+ not refer to the actual data interface until the device has successfully
+ established a data connection, indicated by the device's State becoming
+ ACTIVATED.
+
@@ -230,7 +278,8 @@ IpInterface readable s
Driver readable s
-
The driver handling the device.
+
The driver handling the device.
+
@@ -238,7 +287,8 @@ Driver readable s
DriverVersion readable s
-
The version of the driver handling the device.
+
The version of the driver handling the device.
+
@@ -246,7 +296,8 @@ DriverVersion readable s
FirmwareVersion readable s
-
The firmware version for the device.
+
The firmware version for the device.
+
@@ -254,7 +305,10 @@ FirmwareVersion readable s
Capabilities readable u
-
Flags describing the capabilities of the device.
+
Flags describing the capabilities of the device.
+
Object path of an ActiveConnection object that "owns" this device during activation. The ActiveConnection object tracks the life-cycle of a connection to a specific network and implements the org.freedesktop.NetworkManager.Connection.Active D-Bus interface.
+
Object path of an ActiveConnection object that "owns" this device during
+ activation. The ActiveConnection object tracks the life-cycle of a
+ connection to a specific network and implements the
+ org.freedesktop.NetworkManager.Connection.Active D-Bus interface.
+
@@ -294,7 +360,10 @@ ActiveConnection readable o
Ip4Config readable o
-
Object path of the Ip4Config object describing the configuration of the device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state.
+
Object path of the Ip4Config object describing the configuration of the
+ device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED
+ state.
+
@@ -302,7 +371,10 @@ Ip4Config readable o
Dhcp4Config readable o
-
Object path of the Dhcp4Config object describing the DHCP options returned by the DHCP server. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state.
+
Object path of the Dhcp4Config object describing the DHCP options returned
+ by the DHCP server. Only valid when the device is in the
+ NM_DEVICE_STATE_ACTIVATED state.
+
@@ -310,7 +382,10 @@ Dhcp4Config readable o
Ip6Config readable o
-
Object path of the Ip6Config object describing the configuration of the device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state.
+
Object path of the Ip6Config object describing the configuration of the
+ device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED
+ state.
+
@@ -318,7 +393,10 @@ Ip6Config readable o
Dhcp6Config readable o
-
Object path of the Dhcp6Config object describing the DHCP options returned by the DHCP server. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state.
+
Object path of the Dhcp6Config object describing the DHCP options returned
+ by the DHCP server. Only valid when the device is in the
+ NM_DEVICE_STATE_ACTIVATED state.
+
@@ -326,7 +404,11 @@ Dhcp6Config readable o
Managed readwrite b
-
Whether or not this device is managed by NetworkManager. Setting this property has a similar effect to configuring the device as unmanaged via the keyfile.unmanaged-devices setting in NetworkManager.conf. Changes to this value are not persistent and lost after NetworkManager restart.
+
Whether or not this device is managed by NetworkManager. Setting this
+ property has a similar effect to configuring the device as unmanaged via
+ the keyfile.unmanaged-devices setting in NetworkManager.conf. Changes to
+ this value are not persistent and lost after NetworkManager restart.
+
@@ -334,7 +416,12 @@ Managed readwrite b
Autoconnect readwrite b
-
If TRUE, indicates the device is allowed to autoconnect. If FALSE, manual intervention is required before the device will automatically connect to a known network, such as activating a connection using the device, or setting this property to TRUE. This property cannot be set to TRUE for default-unmanaged devices, since they never autoconnect.
+
If TRUE, indicates the device is allowed to autoconnect. If FALSE, manual
+ intervention is required before the device will automatically connect to a
+ known network, such as activating a connection using the device, or
+ setting this property to TRUE. This property cannot be set to TRUE for
+ default-unmanaged devices, since they never autoconnect.
+
@@ -342,7 +429,9 @@ Autoconnect readwrite b
FirmwareMissing readable b
-
If TRUE, indicates the device is likely missing firmware necessary for its operation.
+
If TRUE, indicates the device is likely missing firmware necessary for its
+ operation.
+
@@ -350,7 +439,9 @@ FirmwareMissing readable b
NmPluginMissing readable b
-
If TRUE, indicates the NetworkManager plugin for the device is likely missing or misconfigured.
+
If TRUE, indicates the NetworkManager plugin for the device is likely
+ missing or misconfigured.
+
@@ -358,7 +449,10 @@ NmPluginMissing readable b
DeviceType readable u
-
The general type of the network device; ie Ethernet, WiFi, etc.
+
The general type of the network device; ie Ethernet, WiFi, etc.
+
An array of object paths of every configured connection that is currently 'available' through this device.
+
An array of object paths of every configured connection that is currently
+ 'available' through this device.
+
@@ -374,7 +470,11 @@ AvailableConnections readable ao
PhysicalPortId readable s
-
If non-empty, an (opaque) indicator of the physical network port associated with the device. This can be used to recognize when two seemingly-separate hardware devices are actually just different virtual interfaces to the same physical port.
+
If non-empty, an (opaque) indicator of the physical network port
+ associated with the device. This can be used to recognize when two
+ seemingly-separate hardware devices are actually just different virtual
+ interfaces to the same physical port.
+
@@ -382,7 +482,8 @@ PhysicalPortId readable s
Mtu readable u
-
The device MTU (maximum transmission unit).
+
The device MTU (maximum transmission unit).
+
@@ -390,7 +491,11 @@ Mtu readable u
Metered readable u
-
Whether the amount of traffic flowing through the device is subject to limitations, for example set by service providers.
+
Whether the amount of traffic flowing through the device is subject to
+ limitations, for example set by service providers.
+
+
Returns: NMMetered
+
@@ -398,7 +503,9 @@ Metered readable u
LldpNeighbors readable aa{sv}
-
Array of LLDP neighbors; each element is a dictionary mapping LLDP TLV names to variant boxed values.
+
Array of LLDP neighbors; each element is a dictionary mapping LLDP TLV
+ names to variant boxed values.
+
True if the device exists, or False for placeholder devices that do not yet exist but could be automatically created by NetworkManager if one of their AvailableConnections was activated.
+
True if the device exists, or False for placeholder devices that do not
+ yet exist but could be automatically created by NetworkManager if one of
+ their AvailableConnections was activated.
+
Array of arrays of IPv4 address/prefix/gateway. All 3 elements of each array are in network byte order. Essentially: [(addr, prefix, gateway), (addr, prefix, gateway), ...] Deprecated: use AddressData and Gateway
+
Array of arrays of IPv4 address/prefix/gateway. All 3 elements of each
+ array are in network byte order. Essentially: [(addr, prefix, gateway),
+ (addr, prefix, gateway), ...] Deprecated: use AddressData and Gateway
+
@@ -93,7 +96,10 @@ Addresses readable aau
AddressData readable aa{sv}
-
Array of IP address data objects. All addresses will include "address" (an IP address string), and "prefix" (a uint). Some addresses may include additional attributes.
+
Array of IP address data objects. All addresses will include "address" (an
+ IP address string), and "prefix" (a uint). Some addresses may include
+ additional attributes.
+
@@ -101,7 +107,8 @@ AddressData readable aa{sv}
Gateway readable s
-
The gateway in use.
+
The gateway in use.
+
@@ -109,7 +116,12 @@ Gateway readable s
Routes readable aau
-
Arrays of IPv4 route/prefix/next-hop/metric. All 4 elements of each tuple are in network byte order. 'route' and 'next hop' are IPv4 addresses, while prefix and metric are simple unsigned integers. Essentially: [(route, prefix, next-hop, metric), (route, prefix, next-hop, metric), ...] Deprecated: use RouteData
+
Arrays of IPv4 route/prefix/next-hop/metric. All 4 elements of each tuple
+ are in network byte order. 'route' and 'next hop' are IPv4 addresses,
+ while prefix and metric are simple unsigned integers. Essentially:
+ [(route, prefix, next-hop, metric), (route, prefix, next-hop, metric),
+ ...] Deprecated: use RouteData
+
@@ -117,7 +129,10 @@ Routes readable aau
RouteData readable aa{sv}
-
Array of IP route data objects. All routes will include "dest" (an IP address string) and "prefix" (a uint). Some routes may include "next-hop" (an IP address string), "metric" (a uint), and additional attributes.
+
Array of IP route data objects. All routes will include "dest" (an IP
+ address string) and "prefix" (a uint). Some routes may include "next-hop"
+ (an IP address string), "metric" (a uint), and additional attributes.
+
@@ -125,7 +140,8 @@ RouteData readable aa{sv}
Nameservers readable au
-
The nameservers in use.
+
The nameservers in use.
+
@@ -133,7 +149,8 @@ Nameservers readable au
Domains readable as
-
A list of domains this address belongs to.
+
A list of domains this address belongs to.
+
@@ -141,7 +158,8 @@ Domains readable as
Searches readable as
-
A list of dns searches.
+
A list of dns searches.
+
@@ -149,7 +167,9 @@ Searches readable as
DnsOptions readable as
-
A list of DNS options that modify the behavior of the DNS resolver. See resolv.conf(5) manual page for the list of supported options.
+
A list of DNS options that modify the behavior of the DNS resolver. See
+ resolv.conf(5) manual page for the list of supported options.
+
@@ -157,7 +177,9 @@ DnsOptions readable as
WinsServers readable au
-
The Windows Internet Name Service servers associated with the connection. Each address is in network byte order.
+
The Windows Internet Name Service servers associated with the connection.
+ Each address is in network byte order.
+
Array of tuples of IPv6 address/prefix/gateway. Deprecated: use AddressData and Gateway.
+
Array of tuples of IPv6 address/prefix/gateway. Deprecated: use
+ AddressData and Gateway.
+
@@ -92,7 +94,10 @@ Addresses readable a(ayuay)
AddressData readable aa{sv}
-
Array of IP address data objects. All addresses will include "address" (an IP address string), and "prefix" (a uint). Some addresses may include additional attributes.
+
Array of IP address data objects. All addresses will include "address" (an
+ IP address string), and "prefix" (a uint). Some addresses may include
+ additional attributes.
+
@@ -100,7 +105,8 @@ AddressData readable aa{sv}
Gateway readable s
-
The gateway in use.
+
The gateway in use.
+
@@ -108,7 +114,8 @@ Gateway readable s
Routes readable a(ayuayu)
-
Tuples of IPv6 route/prefix/next-hop/metric. Deprecated: use RouteData
+
Tuples of IPv6 route/prefix/next-hop/metric. Deprecated: use RouteData
+
@@ -116,7 +123,10 @@ Routes readable a(ayuayu)
RouteData readable aa{sv}
-
Array of IP route data objects. All routes will include "dest" (an IP address string) and "prefix" (a uint). Some routes may include "next-hop" (an IP address string), "metric" (a uint), and additional attributes.
+
Array of IP route data objects. All routes will include "dest" (an IP
+ address string) and "prefix" (a uint). Some routes may include "next-hop"
+ (an IP address string), "metric" (a uint), and additional attributes.
+
@@ -124,7 +134,8 @@ RouteData readable aa{sv}
Nameservers readable aay
-
The nameservers in use.
+
The nameservers in use.
+
@@ -132,7 +143,8 @@ Nameservers readable aay
Domains readable as
-
A list of domains this address belongs to.
+
A list of domains this address belongs to.
+
@@ -140,7 +152,8 @@ Domains readable as
Searches readable as
-
A list of dns searches.
+
A list of dns searches.
+
@@ -148,7 +161,9 @@ Searches readable as
DnsOptions readable as
-
A list of DNS options that modify the behavior of the DNS resolver. See resolv.conf(5) manual page for the list of supported options.
+
A list of DNS options that modify the behavior of the DNS resolver. See
+ resolv.conf(5) manual page for the list of supported options.
+
Private D-Bus interface used by secret agents that store and provide secrets to NetworkManager. If an agent provides secrets to NetworkManager as part of connection creation, and the some of those secrets are "agent owned" the agent should store those secrets itself and should not expect its SaveSecrets() method to be called. SaveSecrets() will be called eg if some program other than the agent itself (like a connection editor) changes the secrets out of band. The agent should implement this D-Bus interface on an object with the path /org/freedesktop/NetworkManager/SecretAgent.
+
Private D-Bus interface used by secret agents that store and provide
+ secrets to NetworkManager. If an agent provides secrets to NetworkManager
+ as part of connection creation, and the some of those secrets are "agent
+ owned" the agent should store those secrets itself and should not expect
+ its SaveSecrets() method to be called. SaveSecrets() will be called eg if
+ some program other than the agent itself (like a connection editor)
+ changes the secrets out of band. The agent should implement this D-Bus
+ interface on an object with the path
+ /org/freedesktop/NetworkManager/SecretAgent.
+
Method Details
-
The GetSecrets() method
+
The GetSecrets() method
GetSecrets (IN a{sa{sv}} connection,
IN o connection_path,
@@ -64,7 +73,14 @@ GetSecrets (IN a{sa{sv}} connection,
IN u flags,
OUT a{sa{sv}} secrets);
-
Retrieve and return stored secrets, if any, or request new secrets from the agent's user. If user interaction is allowed and the user enters new secrets, the agent is expected to save the new secrets to persistent storage (if the secret's flags include AGENT_OWNED) as NetworkManager will not send these secrets back to the same agent via a SaveSecrets() call. If the user canceled any interaction, the agent should return the UserCanceled error (see below).
+
Retrieve and return stored secrets, if any, or request new secrets from
+ the agent's user. If user interaction is allowed and the user enters new
+ secrets, the agent is expected to save the new secrets to persistent
+ storage (if the secret's flags include AGENT_OWNED) as NetworkManager will
+ not send these secrets back to the same agent via a SaveSecrets() call. If
+ the user canceled any interaction, the agent should return the
+ UserCanceled error (see below).
+
@@ -73,11 +89,11 @@ GetSecrets (IN a{sa{sv}} connection,
IN a{sa{sv}} connection:
-
Nested settings maps containing the connection for which secrets are being requested. This may contain system-owned secrets if the agent has successfully authenticated to modify system network settings and the GetSecrets request flags allow user interaction.
+
Nested settings maps containing the connection for which secrets are being requested. This may contain system-owned secrets if the agent has successfully authenticated to modify system network settings and the GetSecrets request flags allow user interaction.
IN o connection_path:
-
Object path of the connection for which secrets are being requested.
+
Object path of the connection for which secrets are being requested.
IN s setting_name:
@@ -85,27 +101,30 @@ GetSecrets (IN a{sa{sv}} connection,
IN as hints:
-
Array of strings of key names in the requested setting for which NetworkManager thinks a secrets may be required, and/or well-known identifiers and data that may be useful to the client in processing the secrets request. Note that it's not always possible to determine which secret is required, so in some cases no hints may be given. The Agent should return any secrets it has, or that it thinks are required, regardless of what hints NetworkManager sends in this request. Some hints have special prefixes that provide information to the agent; for example, VPN requests may send server-specific messages prefixed with "x-vpn-message:".
+
Array of strings of key names in the requested setting for which NetworkManager thinks a secrets may be required, and/or well-known identifiers and data that may be useful to the client in processing the secrets request. Note that it's not always possible to determine which secret is required, so in some cases no hints may be given. The Agent should return any secrets it has, or that it thinks are required, regardless of what hints NetworkManager sends in this request. Some hints have special prefixes that provide information to the agent; for example, VPN requests may send server-specific messages prefixed with "x-vpn-message:".
IN u flags:
-
Flags which modify the behavior of the secrets request. If true, new secrets are assumed to be invalid or incorrect, and the agent should ask the user for new secrets. If false, existing secrets should be retrieved from storage and returned without interrupting the user.
+
(NMSecretAgentGetSecretsFlags) Flags which modify the behavior of the secrets request. If true, new secrets are assumed to be invalid or incorrect, and the agent should ask the user for new secrets. If false, existing secrets should be retrieved from storage and returned without interrupting the user.
OUT a{sa{sv}} secrets:
-
Nested settings maps containing secrets. Each setting MUST contain at least the 'name' field, containing the name of the setting, and one or more secrets.
+
Nested settings maps containing secrets. Each setting MUST contain at least the 'name' field, containing the name of the setting, and one or more secrets.
-
The CancelGetSecrets() method
+
The CancelGetSecrets() method
CancelGetSecrets (IN o connection_path,
IN s setting_name);
-
Cancel a pending GetSecrets request for secrets of the given connection. Any GetSecrets request with the same 'connection_path' and 'setting_name' that are given in a CancelGetSecrets request should be canceled.
+
Cancel a pending GetSecrets request for secrets of the given connection.
+ Any GetSecrets request with the same 'connection_path' and 'setting_name'
+ that are given in a CancelGetSecrets request should be canceled.
+
@@ -114,23 +133,24 @@ CancelGetSecrets (IN o connection_path,
IN o connection_path:
-
Object path of the connection for which, if secrets for the given 'setting_name' are being requested, the request should be canceled.
+
Object path of the connection for which, if secrets for the given 'setting_name' are being requested, the request should be canceled.
IN s setting_name:
-
Setting name for which secrets for this connection were originally being requested.
+
Setting name for which secrets for this connection were originally being requested.
-
The SaveSecrets() method
+
The SaveSecrets() method
SaveSecrets (IN a{sa{sv}} connection,
IN o connection_path);
-
Save given secrets to backing storage.
+
Save given secrets to backing storage.
+
@@ -139,23 +159,24 @@ SaveSecrets (IN a{sa{sv}} connection,
IN a{sa{sv}} connection:
-
Nested settings maps containing the entire connection (including secrets), for which the agent should save the secrets to backing storage. This method will not be called when the agent itself is the process creating or updating a connection; in that case the agent is assumed to have already saved those secrets since it had them already.
+
Nested settings maps containing the entire connection (including secrets), for which the agent should save the secrets to backing storage. This method will not be called when the agent itself is the process creating or updating a connection; in that case the agent is assumed to have already saved those secrets since it had them already.
IN o connection_path:
-
Object path of the connection for which the agent should save secrets to backing storage.
+
Object path of the connection for which the agent should save secrets to backing storage.
-
The DeleteSecrets() method
+
The DeleteSecrets() method
DeleteSecrets (IN a{sa{sv}} connection,
IN o connection_path);
-
Delete secrets from backing storage.
+
Delete secrets from backing storage.
+
@@ -164,11 +185,11 @@ DeleteSecrets (IN a{sa{sv}} connection,
IN a{sa{sv}} connection:
-
Nested settings maps containing the connection properties (sans secrets), for which the agent should delete the secrets from backing storage.
+
Nested settings maps containing the connection properties (sans secrets), for which the agent should delete the secrets from backing storage.
IN o connection_path:
-
Object path of the connection for which the agent should delete secrets from backing storage.
+
Object path of the connection for which the agent should delete secrets from backing storage.
Represents a single network connection configuration.
+
Represents a single network connection configuration.
+
Method Details
-
The Update() method
+
The Update() method
Update (IN a{sa{sv}} properties);
-
Update the connection with new settings and properties (replacing all previous settings and properties) and save the connection to disk. Secrets may be part of the update request, and will be either stored in persistent storage or sent to a Secret Agent for storage, depending on the flags associated with each secret.
+
Update the connection with new settings and properties (replacing all
+ previous settings and properties) and save the connection to disk. Secrets
+ may be part of the update request, and will be either stored in persistent
+ storage or sent to a Secret Agent for storage, depending on the flags
+ associated with each secret.
+
@@ -85,11 +91,19 @@ Update (IN a{sa{sv}} properties);
-
The UpdateUnsaved() method
+
The UpdateUnsaved() method
UpdateUnsaved (IN a{sa{sv}} properties);
-
Update the connection with new settings and properties (replacing all previous settings and properties) but do not immediately save the connection to disk. Secrets may be part of the update request and may sent to a Secret Agent for storage, depending on the flags associated with each secret. Use the 'Save' method to save these changes to disk. Note that unsaved changes will be lost if the connection is reloaded from disk (either automatically on file change or due to an explicit ReloadConnections call).
+
Update the connection with new settings and properties (replacing all
+ previous settings and properties) but do not immediately save the
+ connection to disk. Secrets may be part of the update request and may sent
+ to a Secret Agent for storage, depending on the flags associated with each
+ secret. Use the 'Save' method to save these changes to disk. Note that
+ unsaved changes will be lost if the connection is reloaded from disk
+ (either automatically on file change or due to an explicit
+ ReloadConnections call).
+
@@ -103,19 +117,24 @@ UpdateUnsaved (IN a{sa{sv}} properties);
-
The Delete() method
+
The Delete() method
Delete ();
-
Delete the connection.
+
Delete the connection.
+
-
The GetSettings() method
+
The GetSettings() method
GetSettings (OUT a{sa{sv}} settings);
-
Get the settings maps describing this network configuration. This will never include any secrets required for connection to the network, as those are often protected. Secrets must be requested separately using the GetSecrets() call.
+
Get the settings maps describing this network configuration. This will
+ never include any secrets required for connection to the network, as those
+ are often protected. Secrets must be requested separately using the
+ GetSecrets() call.
+
GetSecrets (IN s setting_name,
OUT a{sa{sv}} secrets);
-
Get the secrets belonging to this network configuration. Only secrets from persistent storage or a Secret Agent running in the requestor's session will be returned. The user will never be prompted for secrets as a result of this request.
+
Get the secrets belonging to this network configuration. Only secrets from
+ persistent storage or a Secret Agent running in the requestor's session
+ will be returned. The user will never be prompted for secrets as a result
+ of this request.
+
@@ -143,7 +166,7 @@ GetSecrets (IN s setting_name,
IN s setting_name:
-
Name of the setting to return secrets for. If empty, all all secrets will be returned.
+
Name of the setting to return secrets for. If empty, all all secrets will be returned.
OUT a{sa{sv}} secrets:
@@ -154,19 +177,22 @@ GetSecrets (IN s setting_name,
-
The ClearSecrets() method
+
The ClearSecrets() method
ClearSecrets ();
-
Clear the secrets belonging to this network connection profile.
+
Clear the secrets belonging to this network connection profile.
+
-
The Save() method
+
The Save() method
Save ();
-
Saves a "dirty" connection (that had previously been updated with UpdateUnsaved) to persistent storage.
+
Saves a "dirty" connection (that had previously been updated with
+ UpdateUnsaved) to persistent storage.
+
@@ -176,7 +202,11 @@ Save ();
Updated ();
-
Emitted when any settings or permissions change. When handling this signal, clients should re-read the connection using the GetSettings method to get the changes and to ensure the client still has permission to access the connection.
+
Emitted when any settings or permissions change. When handling this
+ signal, clients should re-read the connection using the GetSettings method
+ to get the changes and to ensure the client still has permission to access
+ the connection.
+
@@ -184,7 +214,11 @@ Updated ();
Removed ();
-
Emitted when this connection is no longer available. This happens when the connection is deleted or if it is no longer accessible by any of the system's logged-in users. After receipt of this signal, the object no longer exists. Also see the Settings.ConnectionRemoved signal.
+
Emitted when this connection is no longer available. This happens when the
+ connection is deleted or if it is no longer accessible by any of the
+ system's logged-in users. After receipt of this signal, the object no
+ longer exists. Also see the Settings.ConnectionRemoved signal.
+
If set, indicates that the in-memory state of the connection does not match the on-disk state. This flag will be set when UpdateUnsaved() is called or when any connection details change, and cleared when the connection is saved to disk via Save() or from internal operations.
+
If set, indicates that the in-memory state of the connection does not
+ match the on-disk state. This flag will be set when UpdateUnsaved() is
+ called or when any connection details change, and cleared when the
+ connection is saved to disk via Save() or from internal operations.
+
The Settings interface allows clients to view and administrate the connections stored and used by NetworkManager.
+
The Settings interface allows clients to view and administrate the
+ connections stored and used by NetworkManager.
+
Method Details
-
The ListConnections() method
+
The ListConnections() method
ListConnections (OUT ao connections);
-
List the saved network connections known to NetworkManager.
+
List the saved network connections known to NetworkManager.
+
@@ -91,12 +94,13 @@ ListConnections (OUT ao connections);
-
The GetConnectionByUuid() method
+
The GetConnectionByUuid() method
GetConnectionByUuid (IN s uuid,
OUT o connection);
-
Retrieve the object path of a connection, given that connection's UUID.
+
Retrieve the object path of a connection, given that connection's UUID.
+
@@ -116,12 +120,16 @@ GetConnectionByUuid (IN s uuid,
-
The AddConnection() method
+
The AddConnection() method
AddConnection (IN a{sa{sv}} connection,
OUT o path);
-
Add new connection and save it to disk. This operation does not start the network connection unless (1) device is idle and able to connect to the network described by the new connection, and (2) the connection is allowed to be started automatically.
+
Add new connection and save it to disk. This operation does not start the
+ network connection unless (1) device is idle and able to connect to the
+ network described by the new connection, and (2) the connection is allowed
+ to be started automatically.
+
@@ -141,12 +149,19 @@ AddConnection (IN a{sa{sv}} connection,
-
The AddConnectionUnsaved() method
+
The AddConnectionUnsaved() method
AddConnectionUnsaved (IN a{sa{sv}} connection,
OUT o path);
-
Add new connection but do not save it to disk immediately. This operation does not start the network connection unless (1) device is idle and able to connect to the network described by the new connection, and (2) the connection is allowed to be started automatically. Use the 'Save' method on the connection to save these changes to disk. Note that unsaved changes will be lost if the connection is reloaded from disk (either automatically on file change or due to an explicit ReloadConnections call).
+
Add new connection but do not save it to disk immediately. This operation
+ does not start the network connection unless (1) device is idle and able
+ to connect to the network described by the new connection, and (2) the
+ connection is allowed to be started automatically. Use the 'Save' method
+ on the connection to save these changes to disk. Note that unsaved changes
+ will be lost if the connection is reloaded from disk (either automatically
+ on file change or due to an explicit ReloadConnections call).
+
@@ -166,13 +181,19 @@ AddConnectionUnsaved (IN a{sa{sv}} connection,
-
The LoadConnections() method
+
The LoadConnections() method
LoadConnections (IN as filenames,
OUT b status,
OUT as failures);
-
Loads or reloads the indicated connections from disk. You should call this after making changes directly to an on-disk connection file to make sure that NetworkManager sees the changes. (If "monitor-connection-files" in NetworkManager.conf is "true", then this will have no real effect, but is harmless.) As with AddConnection(), this operation does not necessarily start the network connection.
+
Loads or reloads the indicated connections from disk. You should call this
+ after making changes directly to an on-disk connection file to make sure
+ that NetworkManager sees the changes. (If "monitor-connection-files" in
+ NetworkManager.conf is "true", then this will have no real effect, but is
+ harmless.) As with AddConnection(), this operation does not necessarily
+ start the network connection.
+
@@ -181,11 +202,11 @@ LoadConnections (IN as filenames,
IN as filenames:
-
Array of paths to on-disk connection profiles in directories monitored by NetworkManager.
+
Array of paths to on-disk connection profiles in directories monitored by NetworkManager.
OUT b status:
-
Success or failure of the operation as a whole. True if NetworkManager at least tried to load the indicated connections, even if it did not succeed. False if an error occurred before trying to load the connections (eg, permission denied).
+
Success or failure of the operation as a whole. True if NetworkManager at least tried to load the indicated connections, even if it did not succeed. False if an error occurred before trying to load the connections (eg, permission denied).
OUT as failures:
@@ -196,11 +217,16 @@ LoadConnections (IN as filenames,
-
The ReloadConnections() method
+
The ReloadConnections() method
ReloadConnections (OUT b status);
-
Tells NetworkManager to reload all connection files from disk, including noticing any added or deleted connection files. By default, connections are re-read automatically any time they change, so you only need to use this command if you have set "monitor-connection-files=false" in NetworkManager.conf.
+
Tells NetworkManager to reload all connection files from disk, including
+ noticing any added or deleted connection files. By default, connections
+ are re-read automatically any time they change, so you only need to use
+ this command if you have set "monitor-connection-files=false" in
+ NetworkManager.conf.
+
@@ -214,11 +240,12 @@ ReloadConnections (OUT b status);
-
The SaveHostname() method
+
The SaveHostname() method
SaveHostname (IN s hostname);
-
Save the hostname to persistent configuration.
+
Save the hostname to persistent configuration.
+
@@ -226,7 +253,7 @@ SaveHostname (IN s hostname);
IN s hostname:
-
The hostname to save to persistent configuration. If blank, the persistent hostname is cleared.
+
The hostname to save to persistent configuration. If blank, the persistent hostname is cleared.
Emitted when a new connection has been added after NetworkManager has started up and initialized. This signal is not emitted for connections read while starting up, because NetworkManager's D-Bus service is only available after all connections have been read, and to prevent spamming listeners with too many signals at one time. To retrieve the initial connection list, call the ListConnections() method once, and then listen for individual Settings.NewConnection and Settings.Connection.Deleted signals for further updates.
+
Emitted when a new connection has been added after NetworkManager has
+ started up and initialized. This signal is not emitted for connections
+ read while starting up, because NetworkManager's D-Bus service is only
+ available after all connections have been read, and to prevent spamming
+ listeners with too many signals at one time. To retrieve the initial
+ connection list, call the ListConnections() method once, and then listen
+ for individual Settings.NewConnection and Settings.Connection.Deleted
+ signals for further updates.
+
@@ -274,7 +309,12 @@ NewConnection (o connection);
ConnectionRemoved (o connection);
-
Emitted when a connection is no longer available. This happens when the connection is deleted or if it is no longer accessible by any of the system's logged-in users. After receipt of this signal, the connection no longer exists and cannot be used. Also see the Settings.Connection.Removed signal.
+
Emitted when a connection is no longer available. This happens when the
+ connection is deleted or if it is no longer accessible by any of the
+ system's logged-in users. After receipt of this signal, the connection no
+ longer exists and cannot be used. Also see the Settings.Connection.Removed
+ signal.
+
@@ -294,7 +334,8 @@ ConnectionRemoved (o connection);
Connections readable ao
-
List of object paths of available network connection profiles.
+
List of object paths of available network connection profiles.
+
@@ -302,7 +343,8 @@ Connections readable ao
Hostname readable s
-
The machine hostname stored in persistent configuration.
+
The machine hostname stored in persistent configuration.
+
@@ -310,7 +352,8 @@ Hostname readable s
CanModify readable b
-
If true, adding and modifying connections is supported.
+
If true, adding and modifying connections is supported.
+
This interface is provided by plugins providing VPN services to the NetworkManager daemon.
+
This interface is provided by plugins providing VPN services to the
+ NetworkManager daemon.
+
Method Details
-
The Connect() method
+
The Connect() method
Connect (IN a{sa{sv}} connection);
-
Tells the plugin to connect. Interactive secrets requests (eg, emitting the SecretsRequired signal) are not allowed.
+
Tells the plugin to connect. Interactive secrets requests (eg, emitting
+ the SecretsRequired signal) are not allowed.
+
@@ -93,12 +97,15 @@ Connect (IN a{sa{sv}} connection);
-
The ConnectInteractive() method
+
The ConnectInteractive() method
ConnectInteractive (IN a{sa{sv}} connection,
IN a{sv} details);
-
Tells the plugin to connect, allowing interactive secrets requests (eg the plugin is allowed to emit the SecretsRequired signal if the VPN service indicates that it needs additional secrets during the connect process).
+
Tells the plugin to connect, allowing interactive secrets requests (eg the
+ plugin is allowed to emit the SecretsRequired signal if the VPN service
+ indicates that it needs additional secrets during the connect process).
+
@@ -118,12 +125,14 @@ ConnectInteractive (IN a{sa{sv}} connection,
-
The NeedSecrets() method
+
The NeedSecrets() method
NeedSecrets (IN a{sa{sv}} settings,
OUT s setting_name);
-
Asks the plugin whether the provided connection will require secrets to connect successfully.
+
Asks the plugin whether the provided connection will require secrets to
+ connect successfully.
+
@@ -143,19 +152,21 @@ NeedSecrets (IN a{sa{sv}} settings,
-
The Disconnect() method
+
The Disconnect() method
Disconnect ();
-
Disconnect the plugin.
+
Disconnect the plugin.
+
-
The SetConfig() method
+
The SetConfig() method
SetConfig (IN a{sv} config);
-
Set generic connection details on the connection.
+
Set generic connection details on the connection.
+
@@ -169,11 +180,12 @@ SetConfig (IN a{sv} config);
-
The SetIp4Config() method
+
The SetIp4Config() method
SetIp4Config (IN a{sv} config);
-
Set IPv4 details on the connection.
+
Set IPv4 details on the connection.
+
@@ -181,17 +193,18 @@ SetIp4Config (IN a{sv} config);
IN a{sv} config:
-
Ip4Config details for the connection. You must call SetConfig() before calling this.
+
Ip4Config details for the connection. You must call SetConfig() before calling this.
-
The SetIp6Config() method
+
The SetIp6Config() method
SetIp6Config (IN a{sv} config);
-
Set IPv6 details on the connection.
+
Set IPv6 details on the connection.
+
@@ -199,17 +212,18 @@ SetIp6Config (IN a{sv} config);
IN a{sv} config:
-
Ip6Config details for the connection. You must call SetConfig() before calling this.
+
Ip6Config details for the connection. You must call SetConfig() before calling this.
-
The SetFailure() method
+
The SetFailure() method
SetFailure (IN s reason);
-
Indicate a failure to the plugin.
+
Indicate a failure to the plugin.
+
@@ -223,11 +237,13 @@ SetFailure (IN s reason);
-
The NewSecrets() method
+
The NewSecrets() method
NewSecrets (IN a{sa{sv}} connection);
-
Called in response to a SecretsRequired signal to deliver updated secrets or other information to the plugin.
+
Called in response to a SecretsRequired signal to deliver updated secrets
+ or other information to the plugin.
+
@@ -247,7 +263,8 @@ NewSecrets (IN a{sa{sv}} connection);
StateChanged (u state);
-
Emitted when the plugin state changes.
+
Emitted when the plugin state changes.
+
@@ -255,7 +272,7 @@ StateChanged (u state);
u state:
-
The new state of the plugin.
+
(NMVpnServiceState) The new state of the plugin.
@@ -266,7 +283,10 @@ StateChanged (u state);
SecretsRequired (s message,
as secrets);
-
Emitted during an ongoing ConnectInteractive() request when the plugin has determined that new secrets are required. NetworkManager will then call the NewSecrets() method with a connection hash including the new secrets.
+
Emitted during an ongoing ConnectInteractive() request when the plugin has
+ determined that new secrets are required. NetworkManager will then call
+ the NewSecrets() method with a connection hash including the new secrets.
+
@@ -275,11 +295,11 @@ SecretsRequired (s message,
s message:
-
Informational message, if any, about the request. For example, if a second PIN is required, could indicate to the user to wait for the token code to change until entering the next PIN.
+
Informational message, if any, about the request. For example, if a second PIN is required, could indicate to the user to wait for the token code to change until entering the next PIN.
as secrets:
-
Array of strings of VPN secret names which the plugin thinks secrets may be required for, or other VPN-specific data to be processed by the VPN's front-end.
+
Array of strings of VPN secret names which the plugin thinks secrets may be required for, or other VPN-specific data to be processed by the VPN's front-end.
@@ -290,7 +310,8 @@ SecretsRequired (s message,
Config (a{sv} config);
-
The plugin obtained generic configuration information.
+
The plugin obtained generic configuration information.
+
@@ -308,7 +329,8 @@ Config (a{sv} config);
Ip4Config (a{sv} ip4config);
-
The plugin obtained an IPv4 configuration.
+
The plugin obtained an IPv4 configuration.
+
@@ -326,7 +348,8 @@ Ip4Config (a{sv} ip4config);
Ip6Config (a{sv} ip6config);
-
The plugin obtained an IPv6 configuration.
+
The plugin obtained an IPv6 configuration.
+
@@ -344,7 +367,8 @@ Ip6Config (a{sv} ip6config);
LoginBanner (s banner);
-
Emitted when the plugin receives a login banner from the VPN service.
+
Emitted when the plugin receives a login banner from the VPN service.
+
@@ -362,7 +386,8 @@ LoginBanner (s banner);
Failure (u reason);
-
Emitted when a failure in the VPN plugin occurs.
+
Emitted when a failure in the VPN plugin occurs.
+
@@ -114,17 +115,18 @@ GetDevices (OUT ao devices);
OUT ao devices:
-
List of object paths of network devices known to the system. This list does not include device placeholders (see GetAllDevices()).
+
List of object paths of network devices known to the system. This list does not include device placeholders (see GetAllDevices()).
-
The GetAllDevices() method
+
The GetAllDevices() method
GetAllDevices (OUT ao devices);
-
Get the list of all network devices.
+
Get the list of all network devices.
+
@@ -132,18 +134,21 @@ GetAllDevices (OUT ao devices);
OUT ao devices:
-
List of object paths of network devices and device placeholders (eg, devices that do not yet exist but which can be automatically created by NetworkManager if one of their AvailableConnections was activated).
+
List of object paths of network devices and device placeholders (eg, devices that do not yet exist but which can be automatically created by NetworkManager if one of their AvailableConnections was activated).
-
The GetDeviceByIpIface() method
+
The GetDeviceByIpIface() method
GetDeviceByIpIface (IN s iface,
OUT o device);
-
Return the object path of the network device referenced by its IP interface name. Note that some devices (usually modems) only have an IP interface name when they are connected.
+
Return the object path of the network device referenced by its IP
+ interface name. Note that some devices (usually modems) only have an IP
+ interface name when they are connected.
+
@@ -163,14 +168,15 @@ GetDeviceByIpIface (IN s iface,
-
The ActivateConnection() method
+
The ActivateConnection() method
ActivateConnection (IN o connection,
IN o device,
IN o specific_object,
OUT o active_connection);
-
Activate a connection using the supplied device.
+
Activate a connection using the supplied device.
+
@@ -179,15 +185,15 @@ ActivateConnection (IN o connection,
IN o connection:
-
The connection to activate. If "/" is given, a valid device path must be given, and NetworkManager picks the best connection to activate for the given device. VPN connections must always pass a valid connection path.
+
The connection to activate. If "/" is given, a valid device path must be given, and NetworkManager picks the best connection to activate for the given device. VPN connections must always pass a valid connection path.
IN o device:
-
The object path of device to be activated for physical connections. This parameter is ignored for VPN connections, because the specific_object (if provided) specifies the device to use.
+
The object path of device to be activated for physical connections. This parameter is ignored for VPN connections, because the specific_object (if provided) specifies the device to use.
IN o specific_object:
-
The path of a connection-type-specific object this activation should use. This parameter is currently ignored for wired and mobile broadband connections, and the value of "/" should be used (ie, no specific object). For WiFi connections, pass the object path of a specific AP from the card's scan list, or "/" to pick an AP automatically. For VPN connections, pass the object path of an ActiveConnection object that should serve as the "base" connection (to which the VPN connections lifetime will be tied), or pass "/" and NM will automatically use the current default device.
+
The path of a connection-type-specific object this activation should use. This parameter is currently ignored for wired and mobile broadband connections, and the value of "/" should be used (ie, no specific object). For WiFi connections, pass the object path of a specific AP from the card's scan list, or "/" to pick an AP automatically. For VPN connections, pass the object path of an ActiveConnection object that should serve as the "base" connection (to which the VPN connections lifetime will be tied), or pass "/" and NM will automatically use the current default device.
OUT o active_connection:
@@ -198,7 +204,7 @@ ActivateConnection (IN o connection,
-
The AddAndActivateConnection() method
+
The AddAndActivateConnection() method
AddAndActivateConnection (IN a{sa{sv}} connection,
IN o device,
@@ -206,7 +212,11 @@ AddAndActivateConnection (IN a{sa{sv}} connection,
OUT o path,
OUT o active_connection);
-
Adds a new connection using the given details (if any) as a template (automatically filling in missing settings with the capabilities of the given device and specific object), then activate the new connection. Cannot be used for VPN connections at this time.
+
Adds a new connection using the given details (if any) as a template
+ (automatically filling in missing settings with the capabilities of the
+ given device and specific object), then activate the new connection.
+ Cannot be used for VPN connections at this time.
+
@@ -215,7 +225,7 @@ AddAndActivateConnection (IN a{sa{sv}} connection,
IN a{sa{sv}} connection:
-
Connection settings and properties; if incomplete missing settings will be automatically completed using the given device and specific object.
+
Connection settings and properties; if incomplete missing settings will be automatically completed using the given device and specific object.
IN o device:
@@ -223,7 +233,7 @@ AddAndActivateConnection (IN a{sa{sv}} connection,
IN o specific_object:
-
The path of a connection-type-specific object this activation should use. This parameter is currently ignored for wired and mobile broadband connections, and the value of "/" should be used (ie, no specific object). For WiFi connections, pass the object path of a specific AP from the card's scan list, which will be used to complete the details of the newly added connection.
+
The path of a connection-type-specific object this activation should use. This parameter is currently ignored for wired and mobile broadband connections, and the value of "/" should be used (ie, no specific object). For WiFi connections, pass the object path of a specific AP from the card's scan list, which will be used to complete the details of the newly added connection.
OUT o path:
@@ -238,11 +248,12 @@ AddAndActivateConnection (IN a{sa{sv}} connection,
-
The DeactivateConnection() method
+
The DeactivateConnection() method
DeactivateConnection (IN o active_connection);
-
Deactivate an active connection.
+
Deactivate an active connection.
+
@@ -256,11 +267,15 @@ DeactivateConnection (IN o active_connection);
-
The Sleep() method
+
The Sleep() method
Sleep (IN b sleep);
-
Control the NetworkManager daemon's sleep state. When asleep, all interfaces that it manages are deactivated. When awake, devices are available to be activated. This command should not be called directly by users or clients; it is intended for system suspend/resume tracking.
+
Control the NetworkManager daemon's sleep state. When asleep, all
+ interfaces that it manages are deactivated. When awake, devices are
+ available to be activated. This command should not be called directly by
+ users or clients; it is intended for system suspend/resume tracking.
+
@@ -274,11 +289,16 @@ Sleep (IN b sleep);
-
The Enable() method
+
The Enable() method
Enable (IN b enable);
-
Control whether overall networking is enabled or disabled. When disabled, all interfaces that NM manages are deactivated. When enabled, all managed interfaces are re-enabled and available to be activated. This command should be used by clients that provide to users the ability to enable/disable all networking.
+
Control whether overall networking is enabled or disabled. When disabled,
+ all interfaces that NM manages are deactivated. When enabled, all managed
+ interfaces are re-enabled and available to be activated. This command
+ should be used by clients that provide to users the ability to
+ enable/disable all networking.
+
@@ -286,17 +306,20 @@ Enable (IN b enable);
IN b enable:
-
If FALSE, indicates that all networking should be disabled. If TRUE, indicates that NetworkManager should begin managing network devices.
+
If FALSE, indicates that all networking should be disabled. If TRUE, indicates that NetworkManager should begin managing network devices.
-
The GetPermissions() method
+
The GetPermissions() method
GetPermissions (OUT a{ss} permissions);
-
Returns the permissions a caller has for various authenticated operations that NetworkManager provides, like Enable/Disable networking, changing WiFi, WWAN, and WiMAX state, etc.
+
Returns the permissions a caller has for various authenticated operations
+ that NetworkManager provides, like Enable/Disable networking, changing
+ WiFi, WWAN, and WiMAX state, etc.
+
Dictionary of available permissions and results. Each permission is represented by a name (ie "org.freedesktop.NetworkManager.Foobar") and each result is one of the following values: "yes" (the permission is available), "auth" (the permission is available after a successful authentication), or "no" (the permission is denied). Clients may use these values in the UI to indicate the ability to perform certain operations.
+
Dictionary of available permissions and results. Each permission is represented by a name (ie "org.freedesktop.NetworkManager.Foobar") and each result is one of the following values: "yes" (the permission is available), "auth" (the permission is available after a successful authentication), or "no" (the permission is denied). Clients may use these values in the UI to indicate the ability to perform certain operations.
-
The SetLogging() method
+
The SetLogging() method
SetLogging (IN s level,
IN s domains);
-
Set logging verbosity and which operations are logged.
+
Set logging verbosity and which operations are logged.
+
@@ -324,23 +348,24 @@ SetLogging (IN s level,
IN s level:
-
One of [ERR, WARN, INFO, DEBUG, TRACE, OFF, KEEP]. This level is applied to the domains as specified in the domains argument. Except for the special level "KEEP", all unmentioned domains are disabled entirely. "KEEP" is special and allows not to change the current setting except for the specified domains. E.g. level=KEEP and domains=PLATFORM:DEBUG will only touch the platform domain.
+
One of [ERR, WARN, INFO, DEBUG, TRACE, OFF, KEEP]. This level is applied to the domains as specified in the domains argument. Except for the special level "KEEP", all unmentioned domains are disabled entirely. "KEEP" is special and allows not to change the current setting except for the specified domains. E.g. level=KEEP and domains=PLATFORM:DEBUG will only touch the platform domain.
IN s domains:
-
A combination of logging domains separated by commas (','), or "NONE" to disable logging. Each domain enables logging for operations related to that domain. Available domains are: [PLATFORM, RFKILL, ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, AGENTS, SETTINGS, SUSPEND, CORE, DEVICE, OLPC, WIMAX, INFINIBAND, FIREWALL, ADSL, BOND, VLAN, BRIDGE, DBUS_PROPS, TEAM, CONCHECK, DCB, DISPATCH, AUDIT]. In addition to these domains, the following special domains can be used: [NONE, ALL, DEFAULT, DHCP, IP]. You can also specify that some domains should log at a different level from the default by appending a colon (':') and a log level (eg, 'WIFI:DEBUG'). If an empty string is given, the log level is changed but the current set of log domains remains unchanged.
+
A combination of logging domains separated by commas (','), or "NONE" to disable logging. Each domain enables logging for operations related to that domain. Available domains are: [PLATFORM, RFKILL, ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, AGENTS, SETTINGS, SUSPEND, CORE, DEVICE, OLPC, WIMAX, INFINIBAND, FIREWALL, ADSL, BOND, VLAN, BRIDGE, DBUS_PROPS, TEAM, CONCHECK, DCB, DISPATCH, AUDIT]. In addition to these domains, the following special domains can be used: [NONE, ALL, DEFAULT, DHCP, IP]. You can also specify that some domains should log at a different level from the default by appending a colon (':') and a log level (eg, 'WIFI:DEBUG'). If an empty string is given, the log level is changed but the current set of log domains remains unchanged.
-
The GetLogging() method
+
The GetLogging() method
GetLogging (OUT s level,
OUT s domains);
-
Get current logging verbosity level and operations domains.
+
Get current logging verbosity level and operations domains.
+
@@ -353,18 +378,19 @@ GetLogging (OUT s level,
OUT s domains:
-
For available domains see SetLogging() call.
+
For available domains see SetLogging() call.
-
The CheckConnectivity() method
+
The CheckConnectivity() method
CheckConnectivity (OUT u connectivity);
-
Re-check the network connectivity state.
+
Re-check the network connectivity state.
+
@@ -372,17 +398,19 @@ CheckConnectivity (OUT u connectivity);
A device was removed from the system, and is no longer available.
+
A device was removed from the system, and is no longer available.
+
@@ -484,7 +518,10 @@ DeviceRemoved (o device_path);
Devices readable ao
-
The list of realized network devices. Realized devices are those which have backing resources (eg from the kernel or a management daemon like ModemManager, teamd, etc).
+
The list of realized network devices. Realized devices are those which
+ have backing resources (eg from the kernel or a management daemon like
+ ModemManager, teamd, etc).
+
@@ -492,7 +529,10 @@ Devices readable ao
AllDevices readable ao
-
The list of both realized and un-realized network devices. Un-realized devices are software devices which do not yet have backing resources, but for which backing resources can be created if the device is activated.
+
The list of both realized and un-realized network devices. Un-realized
+ devices are software devices which do not yet have backing resources, but
+ for which backing resources can be created if the device is activated.
+
@@ -500,7 +540,9 @@ AllDevices readable ao
NetworkingEnabled readable b
-
Indicates if overall networking is currently enabled or not. See the Enable() method.
+
Indicates if overall networking is currently enabled or not. See the
+ Enable() method.
+
@@ -508,7 +550,8 @@ NetworkingEnabled readable b
WirelessEnabled readwrite b
-
Indicates if wireless is currently enabled or not.
+
Indicates if wireless is currently enabled or not.
+
@@ -516,7 +559,9 @@ WirelessEnabled readwrite b
WirelessHardwareEnabled readable b
-
Indicates if the wireless hardware is currently enabled, i.e. the state of the RF kill switch.
+
Indicates if the wireless hardware is currently enabled, i.e. the state of
+ the RF kill switch.
+
@@ -524,7 +569,8 @@ WirelessHardwareEnabled readable b
WwanEnabled readwrite b
-
Indicates if mobile broadband devices are currently enabled or not.
+
Indicates if mobile broadband devices are currently enabled or not.
+
@@ -532,7 +578,9 @@ WwanEnabled readwrite b
WwanHardwareEnabled readable b
-
Indicates if the mobile broadband hardware is currently enabled, i.e. the state of the RF kill switch.
+
Indicates if the mobile broadband hardware is currently enabled, i.e. the
+ state of the RF kill switch.
+
@@ -540,7 +588,8 @@ WwanHardwareEnabled readable b
WimaxEnabled readwrite b
-
Indicates if WiMAX devices are currently enabled or not.
+
Indicates if WiMAX devices are currently enabled or not.
+
@@ -548,7 +597,9 @@ WimaxEnabled readwrite b
WimaxHardwareEnabled readable b
-
Indicates if the WiMAX hardware is currently enabled, i.e. the state of the RF kill switch.
+
Indicates if the WiMAX hardware is currently enabled, i.e. the state of
+ the RF kill switch.
+
@@ -556,7 +607,8 @@ WimaxHardwareEnabled readable b
ActiveConnections readable ao
-
List of active connection object paths.
+
List of active connection object paths.
+
@@ -564,7 +616,12 @@ ActiveConnections readable ao
PrimaryConnection readable o
-
The object path of the "primary" active connection being used to access the network. In particular, if there is no VPN active, or the VPN does not have the default route, then this indicates the connection that has the default route. If there is a VPN active with the default route, then this indicates the connection that contains the route to the VPN endpoint.
+
The object path of the "primary" active connection being used to access
+ the network. In particular, if there is no VPN active, or the VPN does not
+ have the default route, then this indicates the connection that has the
+ default route. If there is a VPN active with the default route, then this
+ indicates the connection that contains the route to the VPN endpoint.
+
@@ -572,7 +629,10 @@ PrimaryConnection readable o
PrimaryConnectionType readable s
-
The connection type of the "primary" active connection being used to access the network. This is the same as the Type property on the object indicated by PrimaryConnection.
+
The connection type of the "primary" active connection being used to
+ access the network. This is the same as the Type property on the object
+ indicated by PrimaryConnection.
+
@@ -580,7 +640,11 @@ PrimaryConnectionType readable s
Metered readable u
-
Indicates whether the connectivity is metered. This is equivalent to the metered property of the device associated with the primary connection.
+
Indicates whether the connectivity is metered. This is equivalent to the
+ metered property of the device associated with the primary connection.
+
+
Returns: NMMetered
+
@@ -588,7 +652,10 @@ Metered readable u
ActivatingConnection readable o
-
The object path of an active connection that is currently being activated and which is expected to become the new PrimaryConnection when it finishes activating.
+
The object path of an active connection that is currently being activated
+ and which is expected to become the new PrimaryConnection when it finishes
+ activating.
+
@@ -596,7 +663,10 @@ ActivatingConnection readable o
Startup readable b
-
Indicates whether NM is still starting up; this becomes FALSE when NM has finished attempting to activate every connection that it might be able to activate at startup.
+
Indicates whether NM is still starting up; this becomes FALSE when NM has
+ finished attempting to activate every connection that it might be able to
+ activate at startup.
+
Dictionary of global DNS settings where the key is one of "searches", "options" and "domains". The values for the "searches" and "options" keys are string arrays describing the list of search domains and resolver options, respectively. The value of the "domains" key is a second-level dictionary, where each key is a domain name, and each key's value is a third-level dictionary with the keys "servers" and "options". "servers" is a string array of DNS servers, "options" is a string array of domain-specific options.
+
Dictionary of global DNS settings where the key is one of "searches",
+ "options" and "domains". The values for the "searches" and "options" keys
+ are string arrays describing the list of search domains and resolver
+ options, respectively. The value of the "domains" key is a second-level
+ dictionary, where each key is a domain name, and each key's value is a
+ third-level dictionary with the keys "servers" and "options". "servers" is
+ a string array of DNS servers, "options" is a string array of
+ domain-specific options.
+
nm-online — ask NetworkManager whether the network is connected
+
+
+
+
+
Synopsis
+
nm-online [OPTIONS...]
+
+
+
Description
+
nm-online is a utility to find out whether we are
+ online. It is done by asking NetworkManager about its status. When run,
+ nm-online waits until NetworkManager reports an active
+ connection, or specified timeout expires. On exit, the returned status code
+ should be checked (see the return codes below).
+
By default NetworkManager waits for IPv4 dynamic addressing to complete
+ but does not wait for the auto IPv6 dynamic addressing. To
+ wait for IPv6 addressing to complete, either (1) change the network
+ connection's IPv6 may-fail setting to no,
+ and/or (2) change the IPv6 addressing method to manual or
+ dhcp, to indicate that IPv6 connectivity is expected.
+
+
+
Options
+
+
+
+
+
+
+
+
+ -t | --timeout
+ seconds
+
+
Time to wait for a connection, in seconds. If the option is not provided,
+ the default timeout is 30 seconds.
+
+
+
-x | --exit
+
Exit immediately if NetworkManager is not running or connecting.
+
+
+
-q | --quiet
+
Don't print anything.
+
+
+
-s | --wait-for-startup
+
Wait for NetworkManager startup to complete, rather than waiting for
+ network connectivity specifically. Startup is considered complete once
+ NetworkManager has activated (or attempted to activate) every auto-activate
+ connection which is available given the current network state. (This is
+ generally only useful at boot time; after startup has completed,
+ nm-online -s will just return immediately, regardless of the
+ current network state.)
+
+
+
+
+
+
Exit Status
+
nm-online exits with status 0 if it succeeds, a value
+ greater than 0 is returned if an error occurs.
+
+
+
+
+
+
+
+
0
+
Success – already online or connection established within given timeout.
+
+
+
1
+
Offline or not online within given timeout.
+
+
+
2
+
Unknown or unspecified error.
+
+
+
+
+
+
See Also
+
nmcli(1),
+ NetworkManager(8).
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/api/html/nm-settings-ifcfg-rh.html b/docs/api/html/nm-settings-ifcfg-rh.html
index 7a92c0f9..7323d808 100644
--- a/docs/api/html/nm-settings-ifcfg-rh.html
+++ b/docs/api/html/nm-settings-ifcfg-rh.html
@@ -29,7 +29,7 @@
-
DESCRIPTION
+
Description
NetworkManager is based on the concept of connection profiles that contain
network configuration (see nm-settings(5) for details). The profiles can be
@@ -53,7 +53,7 @@
-
File Format
+
File Format
The ifcfg-rh config format is a simple text file containing
VARIABLE="value" lines. The format is described in sysconfig.txt
@@ -178,7 +178,7 @@ DEVICETYPE=TeamPort
-
Differences against initscripts
+
Differences against initscripts
The main differences of NetworkManager ifcfg-rh plugin and traditional
initscripts are:
@@ -240,16 +240,16 @@ DEVICETYPE=TeamPort
See the next section for detailed mapping of NetworkManager properties and
ifcfg-rh variables. Variable names, format and usage
- differences in NetworkManager and initscripts are documented in the tables bellow.
+ differences in NetworkManager and initscripts are documented in the tables below.
-
DETAILS
+
Details
ifcfg-rh plugin variables marked with (+)
are NetworkManager specific extensions not understood by traditional initscripts.
NetworkManager is based on the concept of connection profiles that contain
network configuration (see nm-settings(5) for details). The profiles can be
@@ -48,7 +48,7 @@
-
File Format
+
File Format
The keyfile config format is a simple .ini-style
format. It consists of sections (groups) of key-value pairs. Each section
@@ -58,7 +58,7 @@
specification. The majority of properties of the specification is written
in the same format into the keyfile too. However
some values are inconvenient for people to use. These are stored in the
- files in more readable ways. These properties are described bellow.
+ files in more readable ways. These properties are described below.
An example could be IP addresses that are not written as integer arrays,
but more reasonably as "1.2.3.4/12 1.2.3.254".
More information of the generic key file format can be found at
@@ -167,13 +167,13 @@ id=4
-
DETAILS
+
Details
keyfile plugin variables for the majority of NetworkManager
properties have one-to-one mapping. It means a NetworkManager property is stored
in the keyfile as a variable of the same name and in the same format.
There are several exceptions to this rule, mainly for making keyfile syntax easier
for humans. The exceptions handled specially by keyfile
- plugin are listed bellow. Refer to
+ plugin are listed below. Refer to
nm-settings(5)
for all available settings and properties and their description.
@@ -188,7 +188,7 @@ id=4
802-11-wireless-security = wifi-security
-
Table 61. bridge setting (section)
+
Table 61. bridge setting (section)
@@ -205,7 +205,7 @@ id=4
mac-address
mac-address
-
ususal hex-digits-and-colons notation
+
usual hex-digits-and-colons notation
MAC address in traditional hex-digits-and-colons notation, or semicolon separated list of 6 decimal bytes (obsolete)
Example: mac-address=00:22:68:12:79:A2 mac-address=0;34;104;18;121;162;
MAC address in traditional hex-digits-and-colons notation, or or semicolon separated list of 20 decimal bytes (obsolete)
Example: mac-address= 80:00:00:6d:fe:80:00:00:00:00:00:00:00:02:55:00:70:33:cf:01
MAC address in traditional hex-digits-and-colons notation (e.g. 00:22:68:12:79:A2), or semicolon separated list of 6 bytes (obsolete) (e.g. 0;34;104;18;121;162)
cloned-mac-address
cloned-mac-address
-
ususal hex-digits-and-colons notation
+
usual hex-digits-and-colons notation
Cloned MAC address in traditional hex-digits-and-colons notation (e.g. 00:22:68:12:79:B2), or semicolon separated list of 6 bytes (obsolete) (e.g. 0;34;104;18;121;178).
MAC address in traditional hex-digits-and-colons notation (e.g. 00:22:68:12:79:A2), or semicolon separated list of 6 bytes (obsolete) (e.g. 0;34;104;18;121;162).
cloned-mac-address
cloned-mac-address
-
ususal hex-digits-and-colons notation
+
usual hex-digits-and-colons notation
Cloned MAC address in traditional hex-digits-and-colons notation (e.g. 00:22:68:12:79:B2), or semicolon separated list of 6 bytes (obsolete) (e.g. 0;34;104;18;121;178).
NetworkManager is based on a concept of connection profiles, sometimes referred to as
connections only. These connection profiles contain a network configuration. When
@@ -94,7 +94,7 @@
-
Table 31. 802-1x setting
+
Table 31. 802-1x setting
@@ -257,13 +257,13 @@
phase2-private-key
byte array
-
Contains the "phase 2" inner private key when the "phase2-auth" or "phase2-autheap" property is set to "tls". Key data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte. When using PKCS12 format private keys and the blob scheme, this property should be set to the PKCS12 data and the "phase2-private-key-password" property must be set to password used to decrypt the PKCS12 certificate and key. When using PKCS12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and and ending with a terminating NUL byte, and as with the blob scheme the "phase2-private-key-password" property must be set to the password used to decode the PKCS12 private key and certificate.
+
Contains the "phase 2" inner private key when the "phase2-auth" or "phase2-autheap" property is set to "tls". Key data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the "phase2-private-key-password" property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and and ending with a terminating NUL byte, and as with the blob scheme the "phase2-private-key-password" property must be set to the password used to decode the PKCS#12 private key and certificate.
phase2-private-key-password
string
-
The password used to decrypt the "phase 2" private key specified in the "phase2-private-key" property when the private key either uses the path scheme, or is a PKCS12 format key.
+
The password used to decrypt the "phase 2" private key specified in the "phase2-private-key" property when the private key either uses the path scheme, or is a PKCS#12 format key.
phase2-private-key-password-flags
@@ -293,13 +293,13 @@
private-key
byte array
-
Contains the private key when the "eap" property is set to "tls". Key data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte. When using PKCS12 format private keys and the blob scheme, this property should be set to the PKCS12 data and the "private-key-password" property must be set to password used to decrypt the PKCS12 certificate and key. When using PKCS12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and and ending with a terminating NUL byte, and as with the blob scheme the "private-key-password" property must be set to the password used to decode the PKCS12 private key and certificate. WARNING: "private-key" is not a "secret" property, and thus unencrypted private key data using the BLOB scheme may be readable by unprivileged users. Private keys should always be encrypted with a private key password to prevent unauthorized access to unencrypted private key data.
+
Contains the private key when the "eap" property is set to "tls". Key data is specified using a "scheme"; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and ending with a terminating NUL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the "private-key-password" property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string "file://" and and ending with a terminating NUL byte, and as with the blob scheme the "private-key-password" property must be set to the password used to decode the PKCS#12 private key and certificate. WARNING: "private-key" is not a "secret" property, and thus unencrypted private key data using the BLOB scheme may be readable by unprivileged users. Private keys should always be encrypted with a private key password to prevent unauthorized access to unencrypted private key data.
private-key-password
string
-
The password used to decrypt the private key specified in the "private-key" property when the private key either uses the path scheme, or if the private key is a PKCS12 format key.
+
The password used to decrypt the private key specified in the "private-key" property when the private key either uses the path scheme, or if the private key is a PKCS#12 format key.
private-key-password-flags
@@ -323,7 +323,7 @@
-
Table 32. adsl setting
+
Table 32. adsl setting
@@ -390,7 +390,7 @@
-
Table 33. bluetooth setting
+
Table 33. bluetooth setting
@@ -427,7 +427,7 @@
-
Table 34. bond setting
+
Table 34. bond setting
@@ -464,7 +464,7 @@
-
Table 35. bridge setting
+
Table 35. bridge setting
@@ -543,7 +543,7 @@
-
Table 36. bridge-port setting
+
Table 36. bridge-port setting
@@ -586,7 +586,7 @@
-
Table 37. cdma setting
+
Table 37. cdma setting
@@ -611,7 +611,7 @@
number
string
-
The number to dial to establish the connection to the CDMA-based mobile broadband network, if any. If not specified, the default number (777) is used when required.
+
The number to dial to establish the connection to the CDMA-based mobile broadband network, if any. If not specified, the default number (#777) is used when required.
password
@@ -635,7 +635,7 @@
-
Table 38. connection setting
+
Table 38. connection setting
@@ -762,7 +762,7 @@
-
Table 39. dcb setting
+
Table 39. dcb setting
@@ -877,7 +877,7 @@
-
Table 40. generic setting
+
Table 40. generic setting
@@ -900,7 +900,7 @@
-
Table 41. gsm setting
+
Table 41. gsm setting
@@ -997,7 +997,7 @@
-
Table 42. infiniband setting
+
Table 42. infiniband setting
@@ -1052,7 +1052,7 @@
-
Table 43. ipv4 setting
+
Table 43. ipv4 setting
@@ -1197,7 +1197,7 @@
-
Table 44. ipv6 setting
+
Table 44. ipv6 setting
@@ -1342,7 +1342,7 @@
-
Table 45. ip-tunnel setting
+
Table 45. ip-tunnel setting
@@ -1439,7 +1439,7 @@
-
Table 46. macvlan setting
+
Table 46. macvlan setting
@@ -1488,7 +1488,7 @@
-
Table 47. 802-11-olpc-mesh setting
+
Table 47. 802-11-olpc-mesh setting
@@ -1531,7 +1531,7 @@
-
Table 48. ppp setting
+
Table 48. ppp setting
@@ -1664,7 +1664,7 @@
-
Table 49. pppoe setting
+
Table 49. pppoe setting
@@ -1713,7 +1713,7 @@
-
Table 50. serial setting
+
Table 50. serial setting
@@ -1768,7 +1768,7 @@
-
Table 51. team setting
+
Table 51. team setting
@@ -1805,7 +1805,7 @@
-
Table 52. team-port setting
+
Table 52. team-port setting
@@ -1836,7 +1836,7 @@
-
Table 53. tun setting
+
Table 53. tun setting
@@ -1897,7 +1897,7 @@
-
Table 54. vlan setting
+
Table 54. vlan setting
@@ -1958,7 +1958,7 @@
-
Table 55. vpn setting
+
Table 55. vpn setting
@@ -2019,7 +2019,7 @@
-
Table 56. vxlan setting
+
Table 56. vxlan setting
@@ -2140,7 +2140,7 @@
-
Table 57. wimax setting
+
Table 57. wimax setting
@@ -2177,7 +2177,7 @@
-
Table 58. 802-3-ethernet setting
+
Table 58. 802-3-ethernet setting
@@ -2280,7 +2280,7 @@
-
Table 59. 802-11-wireless setting
+
Table 59. 802-11-wireless setting
@@ -2401,7 +2401,7 @@
-
Table 60. 802-11-wireless-security setting
+
Table 60. 802-11-wireless-security setting
@@ -2547,18 +2547,15 @@
-
AUTHOR
-
NetworkManager developers
+
Files
+
/etc/NetworkManager/system-connections or distro plugin-specific location
nmcli is a command-line client for NetworkManager. It
allows controlling NetworkManager and reporting its status. For more information
@@ -47,14 +47,11 @@
Note: this page has "work-in-progress" status.
-
Examples
+
Examples
-
Example 1. Listing available Wi-Fi APs
+
Example 1. Listing available Wi-Fi APs
-
-$ nmcli device wifi list
-
-
+
$ nmcli device wifi list
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
netdatacomm_local Infra 6 54 Mbit/s 37 ▂▄__ WEP
* F1 Infra 11 54 Mbit/s 98 ▂▄▆█ WPA1
@@ -66,67 +63,60 @@ $ nmcli device wifi list
MARTINA Infra 4 54 Mbit/s 32 ▂▄__ WPA2
N24PU1 Infra 7 11 Mbit/s 22 ▂___ --
alfa Infra 1 54 Mbit/s 67 ▂▄▆_ WPA2
- bertnet Infra 5 54 Mbit/s 20 ▂___ WPA1 WPA2
-
+ bertnet Infra 5 54 Mbit/s 20 ▂___ WPA1 WPA2
+
+ This command shows how to list available Wi-Fi networks (APs). You can also use
+ --fields option for displaying different columns.
+ nmcli -f all dev wifi list will show all of them.
+
-
- This command shows how to list available Wi-Fi networks (APs). You can also use
- --fields option for displaying different columns.
- nmcli -f all dev wifi list will show all of them.
-
-
-
Example 2. Showing general information and properties for a Wi-Fi interface
+
+
Example 2. Showing general information and properties for a Wi-Fi interface
-
-$ nmcli -p -f general,wifi-properties device show wlan0
-
- This command shows configured polkit permissions for various NetworkManager
- operations. These permissions or actions (using polkit language) are configured
- by a system administrator and are not meant to be changed by users. The usual
- place for the polkit configuration is /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy.
- pkaction command can display description for polkit actions.
-
+ This command shows configured polkit permissions for various NetworkManager
+ operations. These permissions or actions (using polkit language) are configured
+ by a system administrator and are not meant to be changed by users. The usual
+ place for the polkit configuration is /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy.
+ pkaction command can display description for polkit actions.
+
+ This command shows current NetworkManager logging status.
+
-
- This command shows current NetworkManager logging status.
-
-
-
Example 5. Changing NetworkManager logging
-
-$ nmcli g log level DEBUG domains CORE,ETHER,IP
-$ nmcli g log level INFO domains DEFAULT
-
+
+
Example 5. Changing NetworkManager logging
+
+
$ nmcli g log level DEBUG domains CORE,ETHER,IP
+$ nmcli g log level INFO domains DEFAULT
+
+ The first command makes NetworkManager log in DEBUG level, and only for CORE, ETHER and
+ IP domains. The second command restores the default logging state. Please refer to the
+ NetworkManager.conf(5) manual page
+ for available logging levels and domains.
+
-
- The first command makes NetworkManager log in DEBUG level, and only for CORE, ETHER and
- IP domains. The second command restores the default logging state. Please refer to the
- NetworkManager.conf(5) manual page
- for available logging levels and domains.
-
-
-
Example 6. Adding a bonding master and two slave connection profiles
-
-$ nmcli con add type bond ifname mybond0 mode active-backup
-$ nmcli con add type ethernet ifname eth1 master mybond0
-$ nmcli con add type ethernet ifname eth2 master mybond0
-
-
- This example demonstrates adding a bond master connection and two slaves. The
- first command adds a master bond connection, naming the bonding interface
- mybond0 and using active-backup mode.
- The next two commands add slaves connections, both enslaved to mybond0.
- The first slave will be bound to eth1 interface, the second to
- eth2.
-
-
-
Example 7. Adding a team master and two slave connection profiles
-
-$ nmcli con add type team con-name Team1 ifname Team1 config team1-master-json.conf
-$ nmcli con add type ethernet con-name Team1-slave1 ifname em1 master Team1
-$ nmcli con add type ethernet con-name Team1-slave2 ifname em2 master Team1
-
+
+
Example 6. Adding a bonding master and two slave connection profiles
+
+
$ nmcli con add type bond ifname mybond0 mode active-backup
+$ nmcli con add type ethernet ifname eth1 master mybond0
+$ nmcli con add type ethernet ifname eth2 master mybond0
+
+ This example demonstrates adding a bond master connection and two slaves. The
+ first command adds a master bond connection, naming the bonding interface
+ mybond0 and using active-backup mode.
+ The next two commands add slaves connections, both enslaved to mybond0.
+ The first slave will be bound to eth1 interface, the second to
+ eth2.
+
-
- This example demonstrates adding a team master connection profile and two slaves. It is
- very similar to the bonding example. The first command adds a master team profile, naming
- the team interface and the profile Team1. The team configuration
- for the master is read from team1-master-json.conf file. Later, you can
- change the configuration with modify command
- (nmcli con modify Team1 team.config team1-master-another-json.conf).
- The last two commands add slaves profiles, both enslaved to Team1.
- The first slave will be bound to em1 interface, the second to
- em2. The slaves don't specify config and thus
- teamd will use its default configuration. You will activate the whole setup
- by activating both slaves:
+
+
+
Example 7. Adding a team master and two slave connection profiles
+
+
$ nmcli con add type team con-name Team1 ifname Team1 config team1-master-json.conf
+$ nmcli con add type ethernet con-name Team1-slave1 ifname em1 master Team1
+$ nmcli con add type ethernet con-name Team1-slave2 ifname em2 master Team1
+
+ This example demonstrates adding a team master connection profile and two slaves. It is
+ very similar to the bonding example. The first command adds a master team profile, naming
+ the team interface and the profile Team1. The team configuration
+ for the master is read from team1-master-json.conf file. Later, you can
+ change the configuration with modify command
+ (nmcli con modify Team1 team.config team1-master-another-json.conf).
+ The last two commands add slaves profiles, both enslaved to Team1.
+ The first slave will be bound to em1 interface, the second to
+ em2. The slaves don't specify config and thus
+ teamd will use its default configuration. You will activate the whole setup
+ by activating both slaves:
+
+
$ nmcli con up Team1-slave1
+ $ nmcli con up Team1-slave2
+
+ By default, the created profiles are marked for auto-activation. But if another
+ connection has been activated on the device, the new profile won't activate
+ automatically and you need to activate it manually.
-
-$ nmcli con up Team1-slave1
-$ nmcli con up Team1-slave2
-
+
+
+
+
Example 8. Adding a bridge and two slave profiles
+
+
$ nmcli con add type bridge con-name TowerBridge ifname TowerBridge
+$ nmcli con add type ethernet con-name br-slave-1 ifname ens3 master TowerBridge
+$ nmcli con add type ethernet con-name br-slave-2 ifname ens4 master TowerBridge
+$ nmcli con modify TowerBridge bridge.stp no
- By default, the created profiles are marked for auto-activation. But if another
- connection has been activated on the device, the new profile won't activate
- automatically and you need to activate it manually.
-
-
-
Example 8. Adding a bridge and two slave profiles
-
-$ nmcli con add type bridge con-name TowerBridge ifname TowerBridge
-$ nmcli con add type ethernet con-name br-slave-1 ifname ens3 master TowerBridge
-$ nmcli con add type ethernet con-name br-slave-2 ifname ens4 master TowerBridge
-$ nmcli con modify TowerBridge bridge.stp no
-
+ This example demonstrates adding a bridge master connection and two slaves. The
+ first command adds a master bridge connection, naming the bridge interface and
+ the profile as TowerBridge.
+ The next two commands add slaves profiles, both will be enslaved to
+ TowerBridge.
+ The first slave will be tied to ens3 interface, the second to
+ ens4.
+ The last command will disable 802.1D STP for the TowerBridge profile.
+
-
- This example demonstrates adding a bridge master connection and two slaves. The
- first command adds a master bridge connection, naming the bridge interface and
- the profile as TowerBridge.
- The next two commands add slaves profiles, both will be enslaved to
- TowerBridge.
- The first slave will be tied to ens3 interface, the second to
- ens4.
- The last command will disable 802.1D STP for the TowerBridge profile.
-
-
-
Example 9. Adding an ethernet connection profile with manual IP configuration
-
-
-$ nmcli con add con-name my-con-em1 ifname em1 type ethernet ip4 192.168.100.100/24 gw4 192.168.100.1 ip4 1.2.3.4 ip6 abbe::cafe
-$ nmcli con mod my-con-em1 ipv4.dns "8.8.8.8 8.8.4.4"
-$ nmcli con mod my-con-em1 +ipv4.dns 1.2.3.4
-$ nmcli con mod my-con-em1 ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844"
-$ nmcli -p con show my-con-em1
-
-
-
- The first command adds an Ethernet connection profile named my-con-em1
- that is bound to interface name em1. The profile is configured
- with static IP addresses. Three addresses are added, two IPv4 addresses and one IPv6.
- The first IP 192.168.100.100 has a prefix of 24 (netmask equivalent of 255.255.255.0).
- Gateway entry will become the default route if this profile is activated on em1 interface
- (and there is no connection with higher priority). The next two addresses do not
- specify a prefix, so a default prefix will be used, i.e. 32 for IPv4 and 128 for IPv6.
- The second, third and fourth commands modify DNS parameters of the new connection profile.
- The last con show command displays the profile so that all
- parameters can be reviewed.
-
-
-
Example 10. Escaping colon characters in tabular mode
+
+
Example 9. Adding an ethernet connection profile with manual IP configuration
-
-
-$ nmcli -t -f general -e yes -m tab dev show eth0
-
-
-
-GENERAL:eth0:ethernet:Intel Corporation:82567LM Gigabit Network Connection:e1000e:2.1.4-k:1.8-3:00\:22\:68\:15\:29\:21:1500:100 (connected):0 (No reason given):/sys/devices/pci0000\:00/0000\:00\:19.0/net/eth0:eth0:yes:yes:no:ethernet-13:89cbcbc6-dc85-456c-9c8b-bd828fee3917:/org/freedesktop/NetworkManager/ActiveConnection/9
-
+
$ nmcli con add con-name my-con-em1 ifname em1 type ethernet \
+ ip4 192.168.100.100/24 gw4 192.168.100.1 ip4 1.2.3.4 ip6 abbe::cafe
+$ nmcli con mod my-con-em1 ipv4.dns "8.8.8.8 8.8.4.4"
+$ nmcli con mod my-con-em1 +ipv4.dns 1.2.3.4
+$ nmcli con mod my-con-em1 ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844"
+$ nmcli -p con show my-con-em1
+
+ The first command adds an Ethernet connection profile named my-con-em1
+ that is bound to interface name em1. The profile is configured
+ with static IP addresses. Three addresses are added, two IPv4 addresses and one IPv6.
+ The first IP 192.168.100.100 has a prefix of 24 (netmask equivalent of 255.255.255.0).
+ Gateway entry will become the default route if this profile is activated on em1 interface
+ (and there is no connection with higher priority). The next two addresses do not
+ specify a prefix, so a default prefix will be used, i.e. 32 for IPv4 and 128 for IPv6.
+ The second, third and fourth commands modify DNS parameters of the new connection profile.
+ The last con show command displays the profile so that all
+ parameters can be reviewed.
+
-
- This example shows escaping colon characters in tabular mode. It may be
- useful for script processing, because ':' is used as a field separator.
-
-
-
Example 11. nmcli usage in a NetworkManager dispatcher script to make Ethernet and Wi-Fi mutually exclusive
+
+
Example 10. Escaping colon characters in tabular mode
$ nmcli -t -f general -e yes -m tab dev show eth0
+GENERAL:eth0:ethernet:Intel Corporation:82567LM Gigabit Network Connection:
+e1000e:2.1.4-k:1.8-3:00\:22\:68\:15\:29\:21:1500:100 (connected):0 (No reas
+on given):/sys/devices/pci0000\:00/0000\:00\:19.0/net/eth0:eth0:yes:yes:no:
+ethernet-13:89cbcbc6-dc85-456c-9c8b-bd828fee3917:/org/freedesktop/NetworkMa
+nager/ActiveConnection/9
+
+ This example shows escaping colon characters in tabular mode. It may be
+ useful for script processing, because ':' is used as a field separator.
+
+
+
+
+
Example 11. nmcli usage in a NetworkManager dispatcher script to make Ethernet and Wi-Fi mutually exclusive
+
+
+#!/bin/bash
+export LC_ALL=C
-enable_disable_wifi()
-{
- result=$(nmcli dev | grep "ethernet"| grep -w "connected")
-if[-n "$result"]; then
- nmcli radio wifi off
-else
- nmcli radio wifi on
- fi
-}
+enable_disable_wifi ()
+{
+ result=$(nmcli dev | grep "ethernet" | grep -w "connected")
+ if [ -n "$result" ]; then
+ nmcli radio wifi off
+ else
+ nmcli radio wifi on
+ fi
+}
-if["$2"="up"]; then
- enable_disable_wifi
-fi
+if [ "$2" = "up" ]; then
+ enable_disable_wifi
+fi
-if["$2"="down"]; then
- enable_disable_wifi
-fi
+ This dispatcher script makes Wi-Fi mutually exclusive with wired
+ networking. When a wired interface is connected, Wi-Fi will be set
+ to airplane mode (rfkilled). When the wired interface is disconnected,
+ Wi-Fi will be turned back on.
+ Name this script e.g. 70-wifi-wired-exclusive.sh and put it into /etc/NetworkManager/dispatcher.d/
+ directory.
+ See NetworkManager(8)
+ manual page for more information about NetworkManager dispatcher scripts.
+
-
-
- This dispatcher script makes Wi-Fi mutually exclusive with wired
- networking. When a wired interface is connected, Wi-Fi will be set
- to airplane mode (rfkilled). When the wired interface is disconnected,
- Wi-Fi will be turned back on.
- Name this script e.g. 70-wifi-wired-exclusive.sh and put it into /etc/NetworkManager/dispatcher.d/
- directory.
- See NetworkManager(8)
- manual page for more information about NetworkManager dispatcher scripts.
-
-
Example sessions of interactive connection editor
+
Example sessions of interactive connection editor
-
Example 12. Adding an ethernet connection profile in interactive editor (a)
+
Example 12. Adding an ethernet connection profile in interactive editor (a)
-
-
-$ nmcli connection edit type ethernet
-
-
-
+
$ nmcli connection edit type ethernet
===| nmcli interactive connection editor |===
@@ -369,72 +322,75 @@ Adding a new '802-3-ethernet' connection
Type 'help' or '?' for available commands.
Type 'describe [<setting>.<prop>]' for detailed property description.
-You may edit the following settings: connection, 802-3-ethernet (ethernet), 802-1x, ipv4, ipv6, dcb
-nmcli> print
-===============================================================================
- Connection details
-===============================================================================
-connection.id: ethernet-4
-connection.uuid: de89cdeb-a3e1-4d53-8fa0-c22546c775f4
-connection.interface-name: --
-connection.type: 802-3-ethernet
-connection.autoconnect: yes
-connection.autoconnect-priority: 0
-connection.timestamp: 0
-connection.read-only: no
-connection.permissions:
-connection.zone: --
-connection.master: --
-connection.slave-type: --
-connection.secondaries:
-connection.gateway-ping-timeout: 0
--------------------------------------------------------------------------------
-802-3-ethernet.port: --
-802-3-ethernet.speed: 0
-802-3-ethernet.duplex: --
-802-3-ethernet.auto-negotiate: yes
-802-3-ethernet.mac-address: --
-802-3-ethernet.cloned-mac-address: --
-802-3-ethernet.mac-address-blacklist:
-802-3-ethernet.mtu: auto
-802-3-ethernet.s390-subchannels:
-802-3-ethernet.s390-nettype: --
-802-3-ethernet.s390-options:
--------------------------------------------------------------------------------
-ipv4.method: auto
-ipv4.dns:
-ipv4.dns-search:
-ipv4.addresses:
-ipv4.gateway: --
-ipv4.routes:
-ipv4.route-metric: -1
-ipv4.ignore-auto-routes: no
-ipv4.ignore-auto-dns: no
-ipv4.dhcp-client-id: --
-ipv4.dhcp-send-hostname: yes
-ipv4.dhcp-hostname: --
-ipv4.never-default: no
-ipv4.may-fail: yes
--------------------------------------------------------------------------------
-ipv6.method: auto
-ipv6.dns:
-ipv6.dns-search:
-ipv6.addresses:
-ipv6.gateway: --
-ipv6.routes:
-ipv6.route-metric: -1
-ipv6.ignore-auto-routes: no
-ipv6.ignore-auto-dns: no
-ipv6.never-default: no
-ipv6.may-fail: yes
-ipv6.ip6-privacy: -1 (unknown)
-ipv6.dhcp-hostname: --
--------------------------------------------------------------------------------
-nmcli> goto ethernet
-You may edit the following properties: port, speed, duplex, auto-negotiate, mac-address, cloned-mac-address, mac-address-blacklist, mtu, s390-subchannels, s390-nettype, s390-options
+You may edit the following settings: connection, 802-3-ethernet (ethernet),
+802-1x, ipv4, ipv6, dcb
+nmcli> print
+===========================================================================
+ Connection details
+===========================================================================
+connection.id: ethernet-4
+connection.uuid: de89cdeb-a3e1-4d53-8fa0-c22546c775f4
+connection.interface-name: --
+connection.type: 802-3-ethernet
+connection.autoconnect: yes
+connection.autoconnect-priority: 0
+connection.timestamp: 0
+connection.read-only: no
+connection.permissions:
+connection.zone: --
+connection.master: --
+connection.slave-type: --
+connection.secondaries:
+connection.gateway-ping-timeout: 0
+---------------------------------------------------------------------------
+802-3-ethernet.port: --
+802-3-ethernet.speed: 0
+802-3-ethernet.duplex: --
+802-3-ethernet.auto-negotiate: yes
+802-3-ethernet.mac-address: --
+802-3-ethernet.cloned-mac-address: --
+802-3-ethernet.mac-address-blacklist:
+802-3-ethernet.mtu: auto
+802-3-ethernet.s390-subchannels:
+802-3-ethernet.s390-nettype: --
+802-3-ethernet.s390-options:
+---------------------------------------------------------------------------
+ipv4.method: auto
+ipv4.dns:
+ipv4.dns-search:
+ipv4.addresses:
+ipv4.gateway: --
+ipv4.routes:
+ipv4.route-metric: -1
+ipv4.ignore-auto-routes: no
+ipv4.ignore-auto-dns: no
+ipv4.dhcp-client-id: --
+ipv4.dhcp-send-hostname: yes
+ipv4.dhcp-hostname: --
+ipv4.never-default: no
+ipv4.may-fail: yes
+---------------------------------------------------------------------------
+ipv6.method: auto
+ipv6.dns:
+ipv6.dns-search:
+ipv6.addresses:
+ipv6.gateway: --
+ipv6.routes:
+ipv6.route-metric: -1
+ipv6.ignore-auto-routes: no
+ipv6.ignore-auto-dns: no
+ipv6.never-default: no
+ipv6.may-fail: yes
+ipv6.ip6-privacy: -1 (unknown)
+ipv6.dhcp-hostname: --
+---------------------------------------------------------------------------
+nmcli> goto ethernet
+You may edit the following properties: port, speed, duplex, auto-negotiate,
+ mac-address, cloned-mac-address, mac-address-blacklist, mtu, s390-subchann
+els, s390-nettype, s390-options
nmcli 802-3-ethernet> set mtu 1492
nmcli 802-3-ethernet> b
-nmcli> goto ipv4.addresses
+nmcli> goto ipv4.addresses
nmcli ipv4.addresses> desc
=== [addresses] ===
@@ -455,144 +411,145 @@ nmcli ipv4.addresses> print
addresses: 192.168.1.100/24
nmcli ipv4.addresses> back
nmcli ipv4> b
-nmcli> set ipv4.gateway 192.168.1.1
-nmcli> verify
+nmcli> set ipv4.gateway 192.168.1.1
+nmcli> verify
Verify connection: OK
-nmcli> print
-===============================================================================
- Connection details
-===============================================================================
-connection.id: ethernet-4
-connection.uuid: de89cdeb-a3e1-4d53-8fa0-c22546c775f4
-connection.interface-name: --
-connection.type: 802-3-ethernet
-connection.autoconnect: yes
-connection.autoconnect-priority: 0
-connection.timestamp: 0
-connection.read-only: no
-connection.permissions:
-connection.zone: --
-connection.master: --
-connection.slave-type: --
-connection.secondaries:
-connection.gateway-ping-timeout: 0
--------------------------------------------------------------------------------
-802-3-ethernet.port: --
-802-3-ethernet.speed: 0
-802-3-ethernet.duplex: --
-802-3-ethernet.auto-negotiate: yes
-802-3-ethernet.mac-address: --
-802-3-ethernet.cloned-mac-address: --
-802-3-ethernet.mac-address-blacklist:
-802-3-ethernet.mtu: 1492
-802-3-ethernet.s390-subchannels:
-802-3-ethernet.s390-nettype: --
-802-3-ethernet.s390-options:
--------------------------------------------------------------------------------
-ipv4.method: manual
-ipv4.dns:
-ipv4.dns-search:
-ipv4.addresses: 192.168.1.100/24
-ipv4.gateway: 192.168.1.1
-ipv4.routes:
-ipv4.route-metric: -1
-ipv4.ignore-auto-routes: no
-ipv4.ignore-auto-dns: no
-ipv4.dhcp-client-id: --
-ipv4.dhcp-send-hostname: yes
-ipv4.dhcp-hostname: --
-ipv4.never-default: no
-ipv4.may-fail: yes
--------------------------------------------------------------------------------
-ipv6.method: auto
-ipv6.dns:
-ipv6.dns-search:
-ipv6.addresses:
-ipv6.routes:
-ipv6.route-metric: -1
-ipv6.ignore-auto-routes: no
-ipv6.ignore-auto-dns: no
-ipv6.never-default: no
-ipv6.may-fail: yes
-ipv6.ip6-privacy: -1 (unknown)
-ipv6.dhcp-hostname: --
--------------------------------------------------------------------------------
-nmcli> set ipv4.dns 8.8.8.8 8.8.4.4
-nmcli> print
-===============================================================================
- Connection details
-===============================================================================
-connection.id: ethernet-4
-connection.uuid: de89cdeb-a3e1-4d53-8fa0-c22546c775f4
-connection.interface-name: --
-connection.type: 802-3-ethernet
-connection.autoconnect: yes
-connection.autoconnect-priority: 0
-connection.timestamp: 0
-connection.read-only: no
-connection.permissions:
-connection.zone: --
-connection.master: --
-connection.slave-type: --
-connection.secondaries:
-connection.gateway-ping-timeout: 0
--------------------------------------------------------------------------------
-802-3-ethernet.port: --
-802-3-ethernet.speed: 0
-802-3-ethernet.duplex: --
-802-3-ethernet.auto-negotiate: yes
-802-3-ethernet.mac-address: --
-802-3-ethernet.cloned-mac-address: --
-802-3-ethernet.mac-address-blacklist:
-802-3-ethernet.mtu: 1492
-802-3-ethernet.s390-subchannels:
-802-3-ethernet.s390-nettype: --
-802-3-ethernet.s390-options:
--------------------------------------------------------------------------------
-ipv4.method: manual
-ipv4.dns: 8.8.8.8,8.8.4.4
-ipv4.dns-search:
-ipv4.addresses: 192.168.1.100/24
-ipv4.gateway: 192.168.1.1
-ipv4.routes:
-ipv4.route-metric: -1
-ipv4.ignore-auto-routes: no
-ipv4.ignore-auto-dns: no
-ipv4.dhcp-client-id: --
-ipv4.dhcp-send-hostname: yes
-ipv4.dhcp-hostname: --
-ipv4.never-default: no
-ipv4.may-fail: yes
--------------------------------------------------------------------------------
-ipv6.method: auto
-ipv6.dns:
-ipv6.dns-search:
-ipv6.addresses:
-ipv6.gateway: --
-ipv6.routes:
-ipv6.route-metric: -1
-ipv6.ignore-auto-routes: no
-ipv6.ignore-auto-dns: no
-ipv6.never-default: no
-ipv6.may-fail: yes
-ipv6.ip6-privacy: -1 (unknown)
-ipv6.dhcp-hostname: --
--------------------------------------------------------------------------------
-nmcli> verify
+nmcli> print
+===========================================================================
+ Connection details
+===========================================================================
+connection.id: ethernet-4
+connection.uuid: de89cdeb-a3e1-4d53-8fa0-c22546c775f4
+connection.interface-name: --
+connection.type: 802-3-ethernet
+connection.autoconnect: yes
+connection.autoconnect-priority: 0
+connection.timestamp: 0
+connection.read-only: no
+connection.permissions:
+connection.zone: --
+connection.master: --
+connection.slave-type: --
+connection.secondaries:
+connection.gateway-ping-timeout: 0
+---------------------------------------------------------------------------
+802-3-ethernet.port: --
+802-3-ethernet.speed: 0
+802-3-ethernet.duplex: --
+802-3-ethernet.auto-negotiate: yes
+802-3-ethernet.mac-address: --
+802-3-ethernet.cloned-mac-address: --
+802-3-ethernet.mac-address-blacklist:
+802-3-ethernet.mtu: 1492
+802-3-ethernet.s390-subchannels:
+802-3-ethernet.s390-nettype: --
+802-3-ethernet.s390-options:
+---------------------------------------------------------------------------
+ipv4.method: manual
+ipv4.dns:
+ipv4.dns-search:
+ipv4.addresses: 192.168.1.100/24
+ipv4.gateway: 192.168.1.1
+ipv4.routes:
+ipv4.route-metric: -1
+ipv4.ignore-auto-routes: no
+ipv4.ignore-auto-dns: no
+ipv4.dhcp-client-id: --
+ipv4.dhcp-send-hostname: yes
+ipv4.dhcp-hostname: --
+ipv4.never-default: no
+ipv4.may-fail: yes
+---------------------------------------------------------------------------
+ipv6.method: auto
+ipv6.dns:
+ipv6.dns-search:
+ipv6.addresses:
+ipv6.routes:
+ipv6.route-metric: -1
+ipv6.ignore-auto-routes: no
+ipv6.ignore-auto-dns: no
+ipv6.never-default: no
+ipv6.may-fail: yes
+ipv6.ip6-privacy: -1 (unknown)
+ipv6.dhcp-hostname: --
+---------------------------------------------------------------------------
+nmcli> set ipv4.dns 8.8.8.8 8.8.4.4
+nmcli> print
+===========================================================================
+ Connection details
+===========================================================================
+connection.id: ethernet-4
+connection.uuid: de89cdeb-a3e1-4d53-8fa0-c22546c775f4
+connection.interface-name: --
+connection.type: 802-3-ethernet
+connection.autoconnect: yes
+connection.autoconnect-priority: 0
+connection.timestamp: 0
+connection.read-only: no
+connection.permissions:
+connection.zone: --
+connection.master: --
+connection.slave-type: --
+connection.secondaries:
+connection.gateway-ping-timeout: 0
+---------------------------------------------------------------------------
+802-3-ethernet.port: --
+802-3-ethernet.speed: 0
+802-3-ethernet.duplex: --
+802-3-ethernet.auto-negotiate: yes
+802-3-ethernet.mac-address: --
+802-3-ethernet.cloned-mac-address: --
+802-3-ethernet.mac-address-blacklist:
+802-3-ethernet.mtu: 1492
+802-3-ethernet.s390-subchannels:
+802-3-ethernet.s390-nettype: --
+802-3-ethernet.s390-options:
+---------------------------------------------------------------------------
+ipv4.method: manual
+ipv4.dns: 8.8.8.8,8.8.4.4
+ipv4.dns-search:
+ipv4.addresses: 192.168.1.100/24
+ipv4.gateway: 192.168.1.1
+ipv4.routes:
+ipv4.route-metric: -1
+ipv4.ignore-auto-routes: no
+ipv4.ignore-auto-dns: no
+ipv4.dhcp-client-id: --
+ipv4.dhcp-send-hostname: yes
+ipv4.dhcp-hostname: --
+ipv4.never-default: no
+ipv4.may-fail: yes
+---------------------------------------------------------------------------
+ipv6.method: auto
+ipv6.dns:
+ipv6.dns-search:
+ipv6.addresses:
+ipv6.gateway: --
+ipv6.routes:
+ipv6.route-metric: -1
+ipv6.ignore-auto-routes: no
+ipv6.ignore-auto-dns: no
+ipv6.never-default: no
+ipv6.may-fail: yes
+ipv6.ip6-privacy: -1 (unknown)
+ipv6.dhcp-hostname: --
+---------------------------------------------------------------------------
+nmcli> verify
Verify connection: OK
-nmcli> save
-Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully saved.
-nmcli> quit
-
+nmcli> save
+Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully
+ saved.
+nmcli> quit
+
+ Example session in the nmcli interactive connection editor.
+ The scenario creates an Ethernet connection profile with static addressing (IPs and DNS).
+
-
- Example session in the nmcli interactive connection editor.
- The scenario creates an Ethernet connection profile with static addressing (IPs and DNS).
-
nmcli — command-line tool for controlling NetworkManager
+
+
+
+
+
Synopsis
+
nmcli [OPTIONS...] { help | general | networking | radio | connection | device | agent | monitor } [COMMAND] [ARGUMENTS...]
+
+
+
Description
+
nmcli is a command-line tool for controlling
+ NetworkManager and reporting network status. It can be utilized as a
+ replacement for nm-applet or other graphical clients.
+ nmcli is used to create, display, edit, delete, activate,
+ and deactivate network connections, as well as control and display network
+ device status.
+
Typical uses include:
+
+
Scripts: Utilize NetworkManager via nmcli instead of
+ managing network connections manually. nmcli 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
+ NetworkManager(8)
+ for details about these dispatcher scripts.
+
Servers, headless machines, and terminals: nmcli can
+ be used to control NetworkManager without a GUI, including creating, editing,
+ starting and stopping network connections and viewing network status.
+
+
+
+
Options
+
+
+
+
+
+
+
+
-t | --terse
+
Output is terse. This mode is designed and suitable for computer (script)
+ processing.
+
+
+
-p | --pretty
+
Output is pretty. This causes nmcli to produce easily
+ readable outputs for humans, i.e. values are aligned, headers are printed,
+ etc.
+
+
+
-m | --mode { tabular | multiline }
+
+
Switch between tabular and multiline output:
+
+
+
+
+
+
+
+
tabular
+
Output is a table where each line describes a single entry.
+ Columns define particular properties of the entry.
+
+
+
multiline
+
Each entry comprises multiple lines, each property on its
+ own line. The values are prefixed with the property name.
+
+
+
+
If omitted, default is tabular for most commands.
+ For the commands producing more structured information, that cannot be
+ displayed on a single line, default is multiline.
+ Currently, they are:
+
+
nmcli connection show ID
+
nmcli device show
+
+
+
+
+
-c | --colors { yes | no | auto }
+
This option controls color output (using terminal escape sequences).
+ yes enables colors, no disables them,
+ auto only produces colors when standard output is directed
+ to a terminal. The default value is auto.
+
+
+
-f | --fields {[field...] | 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
+ by providing an invalid value to the --fields option.
+ all is used to print all valid field values of the
+ command. common is used to print common field values of
+ the command.
+
If omitted, default is common. The option is
+ mandatory when --terse is used. In this case, generic values
+ all and common cannot be used. This
+ is to maintain compatibility when new fields are added in the future.
+
+
+
+
-e | --escape { yes | no }
+
+
Whether to escape : and \ characters in terse tabular mode. The
+ escape character is \.
+
If omitted, default is yes.
+
+
+
+
-n | --nocheck
+
This option can be used to force nmcli to skip
+ checking nmcli and NetworkManager
+ version compatibility. Use it with care, because using incompatible versions
+ may produce incorrect results.
+
+
+
-a | --ask
+
When using this option nmcli will stop and ask for any
+ missing required arguments, so do not use this option for non-interactive
+ purposes like scripts. This option controls, for example, whether you will be
+ prompted for a password if it is required for connecting to a network.
+
+
+
-s | --show-secrets
+
When using this option nmcli will display passwords
+ and secrets that might be present in an output of an operation. This option
+ also influences echoing passwords typed by user as an input.
+
+
+
[
+ -w | --wait
+ seconds...
+ ]
+
+
This option sets a timeout period for which nmcli will
+ wait for NetworkManager to finish operations. It is
+ especially useful for commands that may take a longer time to complete, e.g.
+ connection activation.
+
Specifying a value of 0 instructs
+ nmcli not to wait but to exit immediately with a status of
+ success. The default value depends on the executed command.
+
+
+
+
-v | --version
+
Show nmcli version.
+
+
+
-h | --help
+
Print help information.
+
+
+
+
+
+
General Commands
+
nmcli general { status | hostname | permissions | logging } [ARGUMENTS...]
+
Use this command to show NetworkManager status and permissions. You can also get
+ and change system hostname, as well as NetworkManager logging level and domains.
+
+
+
+
+
+
+
+
status
+
Show overall status of NetworkManager. This is the default action, when
+ no additional command is provided for nmcli general.
+
+
+
+ hostname
+ [hostname]
+
+
+
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.
+
Note that the term "system" hostname may also be referred to as
+ "persistent" or "static" by other programs or tools. The hostname is stored
+ in /etc/hostname file in most distributions. For example,
+ systemd-hostnamed service uses the term "static" hostname and it only reads
+ the /etc/hostname file when it starts.
+
+
+
+
permissions
+
Show the permissions a caller has for various authenticated operations
+ that NetworkManager provides, like enable and disable networking, changing
+ Wi-Fi and WWAN state, modifying connections, etc.
+
+
+
+ logging
+ [levellevel]
+ [domaindomains...]
+
+
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)
+ for available level and domain values.
+
+
+
+
+
+
Networking Control Commands
+
nmcli networking { on | off | connectivity } [ARGUMENTS...]
+
Query NetworkManager networking status, enable and disable networking.
+
+
+
+
+
+
+
+
+
on, off
+
Enable enable or disable networking control by NetworkManager.
+ All interfaces managed by NetworkManager are deactivated when networking
+ is disabled.
+
+
+
+ connectivity
+ [check]
+
+
+
Get network connectivity state. The optional check
+ argument tells NetworkManager to re-check the connectivity, else the most
+ recent known connectivity state is displayed without re-checking.
+
Possible states are:
+
+
+
+
+
+
+
+
none
+
the host is not connected to any network.
+
+
+
portal
+
the host is behind a captive portal and cannot reach the full Internet.
+
+
+
limited
+
the host is connected to a network, but it has no access to the Internet.
+
+
+
full
+
the host is connected to a network and has full access to the Internet.
+
+
+
unknown
+
the connectivity status cannot be found out.
+
+
+
+
+
+
+
+
+
+
Radio Transmission Control Commands
+
nmcli radio { all | wifi | wwan } [ARGUMENTS...]
+
Show radio switches status, or enable and disable the switches.
+
+
+
+
+
+
+
+
+ wifi
+ [ on | off ]
+
+
Show or set status of Wi-Fi in NetworkManager. If no arguments are
+ supplied, Wi-Fi status is printed; on enables Wi-Fi;
+ off disables Wi-Fi.
+
+
+
+ wwan
+ [ on | off ]
+
+
Show or set status of WWAN (mobile broadband) in NetworkManager. If no
+ arguments are supplied, mobile broadband status is printed;
+ on enables mobile broadband, off
+ disables it.
+
+
+
+ all
+ [ on | off ]
+
+
Show or set all previously mentioned radio switches at the same time.
+
+
+
+
+
+
Activity Monitor
+
nmcli monitor
+
Observe NetworkManager activity. Watches for changes
+ in connectivity state, devices or connection profiles.
+
See also nmcli connection monitor
+ and nmcli device monitor to watch
+ for changes in certain devices or connections.
+
+
+
Connection Management Commands
+
nmcli connection { show | up | down | add | edit | modify | delete | monitor | reload | load } [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"
+ 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.
+
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.
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.
+
The --order option can be used to get custom
+ ordering of connections. The connections can be ordered by active status
+ (active), name (name), type
+ (type) or D-Bus path (path). If
+ connections are equal according to a sort order category, an additional
+ category can be specified. The default sorting order is equivalent to
+ --order active:name:path. + or no
+ prefix means sorting in ascending order (alphabetically or in numbers),
+ - means reverse (descending) order. The category names
+ can be abbreviated (e.g. --order -a:na).
+
+
+
+
+ show
+ [--active]
+ [ id | uuid | path | apath ]
+ ID...
+
+
+
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. Use global --show-secrets option to
+ display secrets associated with the profile.
+
id, uuid,
+ path and apath keywords can be used
+ if ID is ambiguous. Optional
+ ID-specifying keywords are:
+
+
+
+
+
+
+
+
id
+
the ID denotes a connection name.
+
+
+
uuid
+
the ID denotes a connection UUID.
+
+
+
path
+
the ID denotes a D-Bus
+ static connection path in the format of
+ /org/freedesktop/NetworkManager/Settings/num
+ or just num.
+
+
+
apath
+
the ID denotes a D-Bus active connection path in the format of
+ /org/freedesktop/NetworkManager/ActiveConnection/num or just
+ num.
+
+
+
+
It is possible to filter the output using the global
+ --fields option. Use the following values:
+
+
+
+
+
+
+
+
profile
+
only shows static profile configuration.
+
+
+
active
+
only shows active connection data (when the profile is active).
+
+
+
+
You can also specify particular fields. For static configuration, use
+ setting and property names as described in
+ nm-settings(5) manual page. For active data use GENERAL, IP4, DHCP4, IP6,
+ DHCP6, VPN.
+
When no command is given to the nmcli connection,
+ the default action is nmcli connection show.
+
+
+
+
+ up
+ [ id | uuid | path ]
+ ID...
+ [ifnameifname]
+ [apBSSID]
+ [passwd-filefile]
+
+
+
Activate a connection. 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. When
+ requiring a particular device to activate the connection on, the
+ ifname option with interface name should be given. If the
+ ID is not given an ifname is required, and
+ NetworkManager will activate the best available connection for the given
+ ifname. In case of a VPN connection, the
+ ifname option specifies the device of the base connection.
+ The ap option specify what particular AP should be used in
+ case of a Wi-Fi connection.
+
If --wait option is not specified, the default timeout will be 90
+ seconds.
+
See connection show above for the description of the
+ ID-specifying keywords.
+
Available options are:
+
+
+
+
+
+
+
+
ifname
+
interface that will be used for activation.
+
+
+
ap
+
BSSID of the AP which the command should connect to (for Wi-Fi connections).
+
+
+
passwd-file
+
+
some networks may require credentials during activation. You can give
+ these credentials using this option. Each line of the file should contain one
+ password in the form:
+
+
+
setting_name.property_name:the password
+
+
+ For example, for WPA Wi-Fi with PSK, the line would be
+
+
+
802-11-wireless-security.psk:secret12345
+
+
+ For 802.1X password, the line would be
+
+
+
802-1x.password:my 1X password
+
+
+ nmcli also accepts wifi-sec and wifi strings instead of
+ 802-11-wireless-security. When NetworkManager requires a password and it is
+ not given, nmcli will ask for it when run with --ask.
+ If --ask was not passed, NetworkManager can ask another secret
+ agent that may be running (typically a GUI secret agent, such as nm-applet or
+ gnome-shell).
+
+
+
+
+
+
+
+
+ down
+ [ id | uuid | path | apath ]
+ ID...
+
+
+
Deactivate a connection from a device without preventing the device from
+ further auto-activation. Multiple connections can be passed to the
+ command.
+
Be aware that this command deactivates the specified active connection,
+ but 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.
+
In most cases you may want to use device disconnect
+ command instead.
+
The connection is identified by its name, UUID or D-Bus path. If
+ ID is ambiguous, a keyword id,
+ uuid, path or
+ apath 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.
Add a connection for NetworkManager. Arguments differ according to connection types, see below.
+
+
+
+
+
+
+
+
ifname
+
interface to bind the connection to. The connection will only be
+ applicable to this interface name. A special value of *
+ can be used for interface-independent connections. The
+ ifname argument is mandatory for all connection types
+ except bond, team, bridge and vlan. Note: use quotes around
+ * to suppress shell expansion.
+
+
+
con-name
+
connection name (when not provided a default name is generated:
+ <type>[-<ifname>][-<num>]).
+
+
+
autoconnect
+
whether the connection profile can be automatically activated (default:
+ yes).
+
+
+
save
+
whether the connection should be persistent, i.e. NetworkManager should
+ store it on disk (default: yes).
+
+
+
master
+
master interface name, or connection UUID or ID of master connection
+ profile. The value can be prefixed with ifname/,
+ uuid/ or id/ to disambiguate it.
+
+
+
slave-type
+
type of master connection. Only required when it can not be inferred
+ (i.e. the master connection does
+ not exist yet).
+
+
+
type
+
connection type; see below for allowed values. Note that types
+ bond-slave, team-slave and
+ bridge-slave create ethernet connection
+ profiles. Their use is discouraged in favor of using a specific type with
+ master option.
+
+
+
+ type ethernet
+ [macaddr]
+ [cloned-macaddr]
+ [mtumtu]
+
+
+
+
+
+
+
+
+
mac
+
MAC address of the device this connection is locked to.
master bond interface name, or connection UUID or
+ ID of bond master connection profile. The value can be
+ prefixed with ifname/,
+ uuid/ or id/ to
+ disambiguate it.
+
+
+
+
+
+ type team
+ [
+ config
+ { file | JSON }
+ ]
+
+
+
+
+
+
+
+
config
+
JSON configuration for team.
+
+
+
+
+
+ type team-slave
+ [
+ config
+ JSON
+ ]
+
+
+
+
+
+
+
+
+
master
+
master team interface name, or connection UUID or
+ ID of team master connection profile. The value can be
+ prefixed with ifname/,
+ uuid/ or id/to
+ disambiguate it.
master bridge interface name, or connection UUID
+ or ID of bridge master connection profile. The value
+ can be prefixed with ifname/,
+ uuid/ or id/
+ to disambiguate it.
+
+
+
priority
+
STP priority of this slave (default: 32).
+
+
+
path-cost
+
STP port cost for destinations via this slave (default: 100).
+
+
+
hairpin
+
'hairpin mode' for the slave, which allows frames to be sent back out
+ through the slave the frame was received on (default: yes).
+
+
+
+
+
+
+ type vpn
+ [typetype]
+ [userusername]
+
+
+
+
+
+
+
+
+
vpn-type
+
VPN type.
+
+
+
user
+
VPN username.
+
+
+
+
+
+
+ type olpc-mesh
+ ssidSSID
+ [channel1-13]
+ [dhcp-anycastMAC]
+
+
+
+
+
+
+
+
+
ssid
+
SSID.
+
+
+
channel
+
channel to use for the network.
+
+
+
dhcp-anycast
+
anycast DHCP MAC address used when requesting an IP address via DHCP.
unicast destination IP address or multicast IP address to join.
+
+
+
dev
+
device to use for tunnel endpoint communication.
+
+
+
local
+
source IP address.
+
+
+
source-port-min
+
minimum UDP source port to communicate to the remote VXLAN tunnel endpoint.
+
+
+
source-port-max
+
maximum UDP source port to communicate to the remote VXLAN tunnel endpoint.
+
+
+
destination-port
+
UDP destination port to communicate to the remote VXLAN tunnel endpoint.
+
+
+
+
+
+
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 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:
+
+
+
+
+
+
+
+
type
+
type of the new connection; valid types are the same as for
+ connection add command.
+
+
+
con-name
+
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 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 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.
+
+
+
+
+
+
+
Device Management Commands
+
nmcli device { status | show | set | connect | reapply | disconnect | delete | monitor | wifi | lldp } [ARGUMENTS...]
+
Show and manage network interfaces.
+
+
+
+
+
+
+
+
status
+
+
Print status of devices.
+
This is the default action if no command is specified to
+ nmcli device.
+
+
+
+
+ show
+ [ifname]
+
+
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.
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.
+
+
+
+
+ reapply
+ [ifname]
+
+
Attempt to update device with changes to the currently active connection
+ made since it was last applied.
+
+
+
+ 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.
+
+
+
+
+ delete
+ [ifname...]
+
+
+
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 --wait option is not specified, the default timeout will be 10
+ seconds.
+
+
+
+
+ monitor
+ [ifname...]
+
+
+
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.
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.
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 name. Note that
+ only open, WEP and WPA-PSK networks are supported at the moment. It is also
+ supposed that IP configuration is obtained via DHCP.
+
If --wait option is not specified, the default timeout will be 90
+ seconds.
+
Available options are:
+
+
+
+
+
+
+
+
password
+
password for secured networks (WEP or WPA).
+
+
+
wep-key-type
+
type of WEP secret, either key for ASCII/HEX key or
+ phrase for passphrase.
+
+
+
ifname
+
interface that will be used for activation.
+
+
+
bssid
+
if specified, the created connection will be restricted just for the
+ BSSID.
+
+
+
name
+
if specified, the connection will use the name (else NM creates a name
+ itself).
+
+
+
private
+
if set to yes, the connection will only be visible
+ to the user who created it. Otherwise the connection is system-wide, which is
+ the default.
+
+
+
hidden
+
set to yes when connecting for the first time to an
+ AP not broadcasting its SSID. Otherwise the SSID would not be found and the
+ connection attempt would fail.
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:
+
+
+
+
+
+
+
+
ifname
+
what Wi-Fi device is used.
+
+
+
con-name
+
name of the created hotspot connection profile.
+
+
+
ssid
+
SSID of the hotspot.
+
+
+
band
+
Wi-Fi band to use.
+
+
+
channel
+
Wi-Fi channel to use.
+
+
+
password
+
+
password to use for the created hotspot. If not provided, nmcli will
+ generate a password. The password is either WPA pre-shared key or WEP
+ key.
+
Note that --show-secrets global option can be used to
+ print the hotspot password. It is useful especially when the password was
+ generated.
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.
+
+
+
+
+ lldp
+ [
+ list
+ [ifnameifname]
+ ]
+
+
Display information about neighboring devices learned through the Link
+ Layer Discovery Protocol (LLDP). The ifname option can be
+ used to list neighbors only for a given interface. The protocol must be enabled
+ in the connection settings.
+
+
+
+
+
+
Secret Agent
+
nmcli agent { secret | polkit | all }
+
Run nmcli as a NetworkManager secret agent, or polkit agent.
+
+
+
+
+
+
+
+
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).
+
+
+
+ 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
+ --ask). However, you may find the command useful when you want
+ to run a simple text based polkit agent and you do not have an agent of a desktop
+ environment. Note that running this command makes nmcli handle all polkit requests,
+ not only NetworkManager related ones, because only one polkit agent can run for the
+ session.
+
+
+
+ all
+
+
Runs nmcli as both NetworkManager secret and a polkit agent.
+
+
+
+
+
+
Environment Variables
+
nmcli's behavior is affected by the following
+ environment variables.
+
+
+
+
+
+
+
+
LC_ALL
+
If set to a non-empty string value, it overrides the values of all the
+ other internationalization variables.
+
+
+
LC_MESSAGES
+
Determines the locale to be used for internationalized messages.
+
+
+
LANG
+
Provides a default value for the internationalization variables that are
+ unset or null.
+
+
+
+
+
+
Internationalization notes
+
Be aware that nmcli is localized and that is why the
+ output depends on your environment. This is important to realize especially
+ when you parse the output.
+
Call nmcli as LC_ALL=C nmcli to
+ be sure the locale is set to C while executing in a script.
+
LC_ALL, LC_MESSAGES, LANG
+ variables specify the LC_MESSAGES locale category (in that
+ order), which determines the language that nmcli uses for
+ messages. The C locale is used if none of these variables are set, and this
+ locale uses English messages.
+
+
+
Exit Status
+
nmcli exits with status 0 if it succeeds, a value
+ greater than 0 is returned if an error occurs.
+
+
+
+
+
+
+
+
0
+
Success – indicates the operation succeeded.
+
+
+
1
+
Unknown or unspecified error.
+
+
+
2
+
Invalid user input, wrong nmcli
+ invocation.
+
+
+
3
+
Timeout expired (see --wait option).
+
+
+
4
+
Connection activation failed.
+
+
+
5
+
Connection deactivation failed.
+
+
+
6
+
Disconnecting device failed.
+
+
+
7
+
Connection deletion failed.
+
+
+
8
+
NetworkManager is not running.
+
+
+
9
+
nmcli and NetworkManager
+ versions mismatch.
+
+
+
10
+
Connection, device, or access point does not exist.
+
+
+
+
+
+
Examples
+
This section presents various examples of nmcli usage. If you want even
+ more, please refer to
+ nmcli-examples(7)
+ manual page.
+
+
+
+
+
+
+
+
nmcli -t -f RUNNING general
+
tells you whether NetworkManager is running or not.
+
+
+
nmcli -t -f STATE general
+
shows the overall status of NetworkManager.
+
+
+
nmcli radio wifi off
+
switches Wi-Fi off.
+
+
+
nmcli connection show
+
lists all connections NetworkManager has.
+
+
+
nmcli -p -m multiline -f all con show
+
shows all configured connections in multi-line mode.
+
+
+
nmcli connection show --active
+
lists all currently active connections.
+
+
+
nmcli -f name,autoconnect c s
+
shows all connection profile names and their auto-connect property.
+
+
+
nmcli -p connection show "My default em1"
+
shows details for "My default em1" connection profile.
+
+
+
nmcli --show-secrets connection show "My Home WiFi"
+
shows details for "My Home WiFi" connection profile with all passwords.
+ Without --show-secrets option, secrets would not be
+ displayed.
+
+
+
nmcli -f active connection show "My default em1"
+
shows details for "My default em1" active connection, like IP, DHCP
+ information, etc.
+
+
+
nmcli -f profile con s "My wired connection"
+
shows static configuration details of the connection profile with "My
+ wired connection" name.
+
+
+
nmcli -p con up "My wired connection" ifname eth0
+
activates the connection profile with name "My wired connection" on
+ interface eth0. The -p option makes nmcli show progress of the
+ activation.
+
+
+
nmcli con up 6b028a27-6dc9-4411-9886-e9ad1dd43761 ap 00:3A:98:7C:42:D3
+
connects the Wi-Fi connection with UUID
+ 6b028a27-6dc9-4411-9886-e9ad1dd43761 to the AP with BSSID
+ 00:3A:98:7C:42:D3.
+
+
+
nmcli device status
+
shows the status for all devices.
+
+
+
nmcli dev disconnect em2
+
disconnects a connection on interface em2 and marks the device as
+ unavailable for auto-connecting. 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.
+
+
+
nmcli -f GENERAL,WIFI-PROPERTIES dev show wlan0
+
shows details for wlan0 interface; only GENERAL and WIFI-PROPERTIES
+ sections will be shown.
+
+
+
nmcli -f CONNECTIONS device show wlp3s0
+
shows all available connection profiles for your Wi-Fi interface
+ wlp3s0.
+
+
+
nmcli dev wifi
+
lists available Wi-Fi access points known to NetworkManager.
+
+
+
nmcli dev wifi con "Cafe Hotspot 1" password caffeine name "My cafe"
+
creates a new connection named "My cafe" and then connects it to "Cafe
+ Hotspot 1" SSID 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.
+
+
+
nmcli -s dev wifi hotspot con-name QuickHotspot
+
creates a hotspot profile and connects it. Prints the hotspot password
+ the user should use to connect to the hotspot from other devices.
+
+
+
nmcli connection add type ethernet autoconnect no ifname eth0
+
non-interactively adds an Ethernet connection tied to eth0 interface with
+ automatic IP configuration (DHCP), and disables the connection's autoconnect
+ flag.
+
+
+
nmcli c a ifname Maxipes-fik type vlan dev eth0 id 55
+
non-interactively adds a VLAN connection with ID 55. The connection will
+ use eth0 and the VLAN interface will be named Maxipes-fik.
+
+
+
nmcli c a ifname eth0 type ethernet -- ipv4.method disabled ipv6.method link-local
+
non-interactively adds a connection that will use eth0 Ethernet interface
+ and only have an IPv6 link-local address configured.
+
+
+
nmcli connection edit ethernet-em1-2
+
edits existing "ethernet-em1-2" connection in the interactive
+ editor.
+
+
+
nmcli connection edit type ethernet con-name "yet another Ethernet connection"
+
adds a new Ethernet connection in the interactive editor.
+
+
+
nmcli con mod ethernet-2 connection.autoconnect no
+
modifies 'autoconnect' property in the 'connection' setting of
+ 'ethernet-2' connection.
+
+
+
nmcli con mod "Home Wi-Fi" wifi.mtu 1350
+
modifies 'mtu' property in the 'wifi' setting of 'Home Wi-Fi'
+ connection.
+
+
+
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"
+
sets manual addressing and the addresses in em1-1 profile.
+
+
+
nmcli con modify ABC +ipv4.dns 8.8.8.8
+
appends a Google public DNS server to DNS servers in ABC profile.
+
+
+
nmcli con modify ABC -ipv4.addresses "192.168.100.25/24 192.168.1.1"
+
removes the specified IP address from (static) profile ABC.
+
+
+
nmcli con import type openvpn file ~/Downloads/frootvpn.ovpn
+
imports an OpenVPN configuration to NetworkManager.
+
+
+
nmcli con export corp-vpnc /home/joe/corpvpn.conf
+
exports NetworkManager VPN profile corp-vpnc as standard Cisco (vpnc)
+ configuration.
+
+
+
+
+
+
Notes
+
nmcli 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 compatibility it is therefore strongly
+ advised to spell out the full option names.
+
+
+
Bugs
+
There are probably some bugs. If you find a bug, please report it to
+ https://bugzilla.gnome.org/ — product NetworkManager.
nmtui is a curses‐based TUI application for
+ interacting with NetworkManager. When starting nmtui, the
+ user is prompted to choose the activity to perform unless it was specified as
+ the first argument.
+
The supported activities are:
+
+
+
+
+
+
+
+
edit
+
Show a connection editor that supports adding, modifying, viewing and
+ deleting connections. It provides similar functionality as
+ nm-connection-editor.
+
+
+
connect
+
Show a list of available connections, with the option to activate or
+ deactivate them. It provides similar functionality as
+ nm-applet.
+
+
+
hostname
+
Set the system hostname.
+
+
+
+
Corresponding to above activities, nmtui also comes
+ with binaries named nmtui-edit,
+ nmtui-connect, and nmtui-hostname to skip
+ the selection of the activities.