diff --git a/man/nmcli-examples.xml b/man/nmcli-examples.xml
index 0e123ff764..e9c6925b2a 100644
--- a/man/nmcli-examples.xml
+++ b/man/nmcli-examples.xml
@@ -51,8 +51,7 @@ Copyright 2013 - 2014 Red Hat, Inc.
Examples
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
@@ -64,18 +63,16 @@ Copyright 2013 - 2014 Red Hat, Inc.
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.
-
Showing general information and properties for a Wi-Fi interface
-
-$ nmcli -p -f general,wifi-properties device show wlan0
+$ nmcli -p -f general,wifi-properties device show wlan0
===========================================================================
Device details (wlan0)
===========================================================================
@@ -108,16 +105,14 @@ WIFI-PROPERTIES.TKIP: yes
WIFI-PROPERTIES.CCMP: yes
WIFI-PROPERTIES.AP: no
WIFI-PROPERTIES.ADHOC: yes
----------------------------------------------------------------------------
-
+---------------------------------------------------------------------------
+
+ This command shows information about a Wi-Fi device.
+
-
- This command shows information about a Wi-Fi device.
-
Listing NetworkManager polkit permissions
-
-$ nmcli general permissions
+$ nmcli general permissions
PERMISSION VALUE
org.freedesktop.NetworkManager.enable-disable-network yes
org.freedesktop.NetworkManager.enable-disable-wifi yes
@@ -129,148 +124,131 @@ org.freedesktop.NetworkManager.wifi.share.protected yes
org.freedesktop.NetworkManager.wifi.share.open yes
org.freedesktop.NetworkManager.settings.modify.system yes
org.freedesktop.NetworkManager.settings.modify.own yes
-org.freedesktop.NetworkManager.settings.modify.hostname auth
-
+org.freedesktop.NetworkManager.settings.modify.hostname auth
+
+ 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.
+
+ pkaction --action-id org.freedesktop.NetworkManager.network-control --verbose
+
+ More information about polkit can be found at http://www.freedesktop.org/wiki/Software/polkit.
+
-
- 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.
-
-pkaction --action-id org.freedesktop.NetworkManager.network-control --verbose
-
- More information about polkit can be found at http://www.freedesktop.org/wiki/Software/polkit.
-
Listing NetworkManager log level and domains
-
-$ nmcli general logging
+$ nmcli general logging
LEVEL DOMAINS
INFO PLATFORM,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,A
UTOIP4,DNS,VPN,SHARING,SUPPLICANT,AGENTS,SETTINGS,SUSPEND,CORE,DEVICE,OLPC,
WIMAX,INFINIBAND,FIREWALL,ADSL,BOND,VLAN,BRIDGE,DBUS_PROPS,TEAM,CONCHECK,DC
-B,DISPATCH
-
+B,DISPATCH
+
+ This command shows current NetworkManager logging status.
+
-
- This command shows current NetworkManager logging status.
-
Changing NetworkManager logging
-
-$ nmcli g log level DEBUG domains CORE,ETHER,IP
-$ nmcli g log level INFO domains DEFAULT
-
+$ 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.conf5 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.conf5 manual page
- for available logging levels and domains.
-
Adding a bonding master and two slave connection profiles
-
-$ nmcli con add type bond ifname mybond0 mode active-backup
+$ 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
-
+$ 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 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.
-
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 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
-
+$ 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.
+
-
- 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.
-
Adding a bridge and two slave profiles
-
-$ nmcli con add type bridge con-name TowerBridge ifname TowerBridge
+$ 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
-
+$ 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.
-
Adding an ethernet connection profile with manual IP configuration
-
-$ nmcli con add con-name my-con-em1 ifname em1 type ethernet \
+$ 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
-
+$ 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.
+
-
- 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.
-
Escaping colon characters in tabular mode
-
-$ nmcli -t -f general -e yes -m tab dev show eth0
+$ 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
-
+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.
+
-
- This example shows escaping colon characters in tabular mode. It may be
- useful for script processing, because ':' is used as a field separator.
-
nmcli usage in a NetworkManager dispatcher script to make Ethernet and Wi-Fi mutually exclusive
@@ -295,24 +273,22 @@ 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 NetworkManager8
+ 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 NetworkManager8
- manual page for more information about NetworkManager dispatcher scripts.
-
-
Example sessions of interactive connection editor
Adding an ethernet connection profile in interactive editor (a)
-
-$ nmcli connection edit type ethernet
+$ nmcli connection edit type ethernet
===| nmcli interactive connection editor |===
@@ -538,13 +514,12 @@ Verify connection: OK
nmcli> save
Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully
saved.
-nmcli> quit
-
+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).
-