summaryrefslogtreecommitdiff
path: root/man/nmcli-examples.xml
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-04-01 11:31:05 +0200
committerLubomir Rintel <lkundrak@v3.sk>2016-04-01 12:13:52 +0200
commit14421ac4aabbf9636ba0beebc4304191d3959905 (patch)
tree6b139d2f943e3b4eb80d17a7e5f70874de8d6d6d /man/nmcli-examples.xml
parent6fb80e1060e9b303b499bb5ca33d94311ac748b7 (diff)
downloadNetworkManager-14421ac4aabbf9636ba0beebc4304191d3959905.tar.gz
man/nmcli-examples: structure the screen examples better
The synopsis tag is not appropriate and doesn't look well in HTML and inserts unnecessary line breaks in roff. The <userinput> in <screen> suits this perfectly on the other hand.
Diffstat (limited to 'man/nmcli-examples.xml')
-rw-r--r--man/nmcli-examples.xml92
1 files changed, 37 insertions, 55 deletions
diff --git a/man/nmcli-examples.xml b/man/nmcli-examples.xml
index 0ce7dc72c6..1f6a4b47aa 100644
--- a/man/nmcli-examples.xml
+++ b/man/nmcli-examples.xml
@@ -51,10 +51,8 @@ Copyright 2013 - 2014 Red Hat, Inc.
<title>Examples</title>
<example><title>Listing available Wi-Fi APs</title>
- <synopsis><emphasis role="bold">
-$ nmcli device wifi list
- </emphasis></synopsis>
<screen>
+<userinput>$ nmcli device wifi list</userinput>
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
netdatacomm_local Infra 6 54 Mbit/s 37 ▂▄__ WEP
* F1 Infra 11 54 Mbit/s 98 ▂▄▆█ WPA1
@@ -76,10 +74,8 @@ $ nmcli device wifi list
</para>
<example><title>Showing general information and properties for a Wi-Fi interface</title>
- <synopsis><emphasis role="bold">
-$ nmcli -p -f general,wifi-properties device show wlan0
- </emphasis></synopsis>
<screen>
+<userinput>$ nmcli -p -f general,wifi-properties device show wlan0</userinput>
===============================================================================
Device details (wlan0)
===============================================================================
@@ -119,10 +115,8 @@ WIFI-PROPERTIES.ADHOC: yes
</para>
<example><title>Listing NetworkManager polkit permissions</title>
- <synopsis><emphasis role="bold">
-$ nmcli general permissions
- </emphasis></synopsis>
<screen>
+<userinput>$ nmcli general permissions</userinput>
PERMISSION VALUE
org.freedesktop.NetworkManager.enable-disable-network yes
org.freedesktop.NetworkManager.enable-disable-wifi yes
@@ -150,10 +144,8 @@ pkaction --action-id org.freedesktop.NetworkManager.network-control --verbose
</para>
<example><title>Listing NetworkManager log level and domains</title>
- <synopsis><emphasis role="bold">
-$ nmcli general logging
- </emphasis></synopsis>
<screen>
+<userinput>$ nmcli general logging</userinput>
LEVEL DOMAINS
INFO 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
</screen>
@@ -163,10 +155,10 @@ INFO PLATFORM,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP
</para>
<example><title>Changing NetworkManager logging</title>
- <synopsis><emphasis role="bold">
-$ nmcli g log level DEBUG domains CORE,ETHER,IP
-$ nmcli g log level INFO domains DEFAULT
- </emphasis></synopsis>
+ <screen>
+<userinput>$ nmcli g log level DEBUG domains CORE,ETHER,IP</userinput>
+<userinput>$ nmcli g log level INFO domains DEFAULT</userinput>
+ </screen>
</example>
<para>
The first command makes NetworkManager log in DEBUG level, and only for CORE, ETHER and
@@ -176,11 +168,11 @@ $ nmcli g log level INFO domains DEFAULT
</para>
<example><title>Adding a bonding master and two slave connection profiles</title>
- <synopsis><emphasis role="bold">
-$ 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
- </emphasis></synopsis>
+ <screen>
+<userinput>$ nmcli con add type bond ifname mybond0 mode active-backup</userinput>
+<userinput>$ nmcli con add type ethernet ifname eth1 master mybond0</userinput>
+<userinput>$ nmcli con add type ethernet ifname eth2 master mybond0</userinput>
+ </screen>
</example>
<para>
This example demonstrates adding a bond master connection and two slaves. The
@@ -192,11 +184,11 @@ $ nmcli con add type ethernet ifname eth2 master mybond0
</para>
<example><title>Adding a team master and two slave connection profiles</title>
- <synopsis><emphasis role="bold">
-$ 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
- </emphasis></synopsis>
+ <screen>
+<userinput>$ nmcli con add type team con-name Team1 ifname Team1 config team1-master-json.conf</userinput>
+<userinput>$ nmcli con add type ethernet con-name Team1-slave1 ifname em1 master Team1</userinput>
+<userinput>$ nmcli con add type ethernet con-name Team1-slave2 ifname em2 master Team1</userinput>
+ </screen>
</example>
<para>
This example demonstrates adding a team master connection profile and two slaves. It is
@@ -210,22 +202,22 @@ $ nmcli con add type ethernet con-name Team1-slave2 ifname em2 master Team1
<emphasis>em2</emphasis>. The slaves don't specify <emphasis>config</emphasis> and thus
<emphasis>teamd</emphasis> will use its default configuration. You will activate the whole setup
by activating both slaves:
- <synopsis><emphasis role="bold">
-$ nmcli con up Team1-slave1
-$ nmcli con up Team1-slave2
- </emphasis></synopsis>
+ <screen>
+<userinput>$ nmcli con up Team1-slave1</userinput>
+<userinput>$ nmcli con up Team1-slave2</userinput>
+ </screen>
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.
</para>
<example><title>Adding a bridge and two slave profiles</title>
- <synopsis><emphasis role="bold">
-$ 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
- </emphasis></synopsis>
+ <screen>
+<userinput>$ nmcli con add type bridge con-name TowerBridge ifname TowerBridge</userinput>
+<userinput>$ nmcli con add type ethernet con-name br-slave-1 ifname ens3 master TowerBridge</userinput>
+<userinput>$ nmcli con add type ethernet con-name br-slave-2 ifname ens4 master TowerBridge</userinput>
+<userinput>$ nmcli con modify TowerBridge bridge.stp no</userinput>
+ </screen>
</example>
<para>
This example demonstrates adding a bridge master connection and two slaves. The
@@ -239,15 +231,13 @@ $ nmcli con modify TowerBridge bridge.stp no
</para>
<example><title>Adding an ethernet connection profile with manual IP configuration</title>
- <synopsis>
- <emphasis role="bold">
-$ 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
- </emphasis>
- </synopsis>
+ <screen>
+<userinput>$ 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</userinput>
+<userinput>$ nmcli con mod my-con-em1 ipv4.dns "8.8.8.8 8.8.4.4"</userinput>
+<userinput>$ nmcli con mod my-con-em1 +ipv4.dns 1.2.3.4</userinput>
+<userinput>$ nmcli con mod my-con-em1 ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844"</userinput>
+<userinput>$ nmcli -p con show my-con-em1</userinput>
+ </screen>
</example>
<para>
The first command adds an Ethernet connection profile named <emphasis>my-con-em1</emphasis>
@@ -263,12 +253,8 @@ $ nmcli -p con show my-con-em1
</para>
<example><title>Escaping colon characters in tabular mode</title>
- <synopsis>
- <emphasis role="bold">
-$ nmcli -t -f general -e yes -m tab dev show eth0
- </emphasis>
- </synopsis>
<screen>
+<userinput>$ nmcli -t -f general -e yes -m tab dev show eth0</userinput>
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
</screen>
</example>
@@ -316,12 +302,8 @@ fi
<para><emphasis role="bold">Example sessions of interactive connection editor</emphasis></para>
<example><title>Adding an ethernet connection profile in interactive editor (a)</title>
- <synopsis>
- <emphasis role="bold">
-$ nmcli connection edit type ethernet
- </emphasis>
- </synopsis>
<screen>
+<userinput>$ nmcli connection edit type ethernet</userinput>
===| nmcli interactive connection editor |===