diff options
Diffstat (limited to 'docs/api/html/nmcli-examples.html')
| -rw-r--r-- | docs/api/html/nmcli-examples.html | 60 |
1 files changed, 40 insertions, 20 deletions
diff --git a/docs/api/html/nmcli-examples.html b/docs/api/html/nmcli-examples.html index 5a979cdf..63708031 100644 --- a/docs/api/html/nmcli-examples.html +++ b/docs/api/html/nmcli-examples.html @@ -5,9 +5,9 @@ <title>nmcli-examples: NetworkManager Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="index.html" title="NetworkManager Reference Manual"> -<link rel="up" href="manpages.html" title="Manual Pages"> -<link rel="prev" href="nm-settings-ifcfg-rh.html" title="nm-settings-ifcfg-rh"> -<link rel="next" href="NetworkManager.html" title="NetworkManager"> +<link rel="up" href="manpages.html" title="Part I. Manual Pages"> +<link rel="prev" href="nmcli.html" title="nmcli"> +<link rel="next" href="nmtui.html" title="nmtui"> <meta name="generator" content="GTK-Doc V1.25 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> @@ -16,8 +16,8 @@ <td width="100%" align="left" class="shortcuts"></td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="manpages.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> -<td><a accesskey="p" href="nm-settings-ifcfg-rh.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> -<td><a accesskey="n" href="NetworkManager.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> +<td><a accesskey="p" href="nmcli.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> +<td><a accesskey="n" href="nmtui.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="nmcli-examples"></a><div class="titlepage"></div> @@ -33,7 +33,7 @@ <div class="cmdsynopsis"><p><code class="command">nmcli</code> [OPTIONS...]</p></div> </div> <div class="refsect1"> -<a name="id-1.2.9.5"></a><h2>Description</h2> +<a name="id-1.2.5.5"></a><h2>Description</h2> <p> <span class="emphasis"><em>nmcli</em></span> is a command-line client for NetworkManager. It allows controlling NetworkManager and reporting its status. For more information @@ -46,9 +46,9 @@ </p> </div> <div class="refsect1"> -<a name="id-1.2.9.6"></a><h2>Examples</h2> +<a name="id-1.2.5.6"></a><h2>Examples</h2> <div class="example"> -<a name="id-1.2.9.6.2"></a><p class="title"><b>Example 1. Listing available Wi-Fi APs</b></p> +<a name="id-1.2.5.6.2"></a><p class="title"><b>Example 1. Listing available Wi-Fi APs</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli device wifi list</code></strong> * SSID MODE CHAN RATE SIGNAL BARS SECURITY @@ -71,7 +71,7 @@ </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.3"></a><p class="title"><b>Example 2. Showing general information and properties for a Wi-Fi interface</b></p> +<a name="id-1.2.5.6.3"></a><p class="title"><b>Example 2. Showing general information and properties for a Wi-Fi interface</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli -p -f general,wifi-properties device show wlan0</code></strong> =========================================================================== @@ -113,7 +113,7 @@ WIFI-PROPERTIES.ADHOC: yes </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.4"></a><p class="title"><b>Example 3. Listing NetworkManager polkit permissions</b></p> +<a name="id-1.2.5.6.4"></a><p class="title"><b>Example 3. Listing NetworkManager polkit permissions</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli general permissions</code></strong> PERMISSION VALUE @@ -146,7 +146,7 @@ org.freedesktop.NetworkManager.reload auth</pre> </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.5"></a><p class="title"><b>Example 4. Listing NetworkManager log level and domains</b></p> +<a name="id-1.2.5.6.5"></a><p class="title"><b>Example 4. Listing NetworkManager log level and domains</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli general logging</code></strong> LEVEL DOMAINS @@ -160,7 +160,7 @@ B,DISPATCH</pre> </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.6"></a><p class="title"><b>Example 5. Changing NetworkManager logging</b></p> +<a name="id-1.2.5.6.6"></a><p class="title"><b>Example 5. Changing NetworkManager logging</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli g log level DEBUG domains CORE,ETHER,IP</code></strong> <code class="prompt">$ </code><strong class="userinput"><code>nmcli g log level INFO domains DEFAULT</code></strong></pre> @@ -173,7 +173,7 @@ B,DISPATCH</pre> </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.7"></a><p class="title"><b>Example 6. Adding a bonding master and two slave connection profiles</b></p> +<a name="id-1.2.5.6.7"></a><p class="title"><b>Example 6. Adding a bonding master and two slave connection profiles</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli con add type bond ifname mybond0 mode active-backup</code></strong> <code class="prompt">$ </code><strong class="userinput"><code>nmcli con add type ethernet ifname eth1 master mybond0</code></strong> @@ -189,7 +189,7 @@ B,DISPATCH</pre> </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.8"></a><p class="title"><b>Example 7. Adding a team master and two slave connection profiles</b></p> +<a name="id-1.2.5.6.8"></a><p class="title"><b>Example 7. Adding a team master and two slave connection profiles</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli con add type team con-name Team1 ifname Team1 config team1-master-json.conf</code></strong> <code class="prompt">$ </code><strong class="userinput"><code>nmcli con add type ethernet con-name Team1-slave1 ifname em1 master Team1</code></strong> @@ -217,7 +217,7 @@ B,DISPATCH</pre> </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.9"></a><p class="title"><b>Example 8. Adding a bridge and two slave profiles</b></p> +<a name="id-1.2.5.6.9"></a><p class="title"><b>Example 8. Adding a bridge and two slave profiles</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli con add type bridge con-name TowerBridge ifname TowerBridge</code></strong> <code class="prompt">$ </code><strong class="userinput"><code>nmcli con add type ethernet con-name br-slave-1 ifname ens3 master TowerBridge</code></strong> @@ -236,7 +236,7 @@ B,DISPATCH</pre> </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.10"></a><p class="title"><b>Example 9. Adding an ethernet connection profile with manual IP configuration</b></p> +<a name="id-1.2.5.6.10"></a><p class="title"><b>Example 9. Adding an ethernet connection profile with manual IP configuration</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>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</code></strong> @@ -259,7 +259,27 @@ B,DISPATCH</pre> </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.11"></a><p class="title"><b>Example 10. Escaping colon characters in tabular mode</b></p> +<a name="id-1.2.5.6.11"></a><p class="title"><b>Example 10. Convenient field values retrieval for scripting</b></p> +<div class="example-contents"> +<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli -g ip4.address connection show my-con-eth0</code></strong> +192.168.1.12/24</pre> +<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli -g ip4.address,ip4.dns connection show my-con-eth0</code></strong> +192.168.1.12/24 +192.168.1.1</pre> +<pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli -g ip4 connection show my-con-eth0</code></strong> +IP4:192.168.1.12/24:192.168.1.1::192.168.1.1::</pre> +<p> + This example shows retrieval of ip4 connection field values via the --get-values + option. Multiple comma separated fields can be provided: they will be printed one + per line. If a whole section is provided instead of a single field, the name of the + section will be printed followed by all the related field values on the same line. + See also --terse, --mode, --fields and --escape options in <a class="link" href="nmcli.html" title="nmcli"><span class="citerefentry"><span class="refentrytitle">nmcli</span>(1)</span></a> + manual page for more customized output. + </p> +</div> +</div> +<br class="example-break"><div class="example"> +<a name="id-1.2.5.6.12"></a><p class="title"><b>Example 11. Escaping colon characters in tabular mode</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli -t -f general -e yes -m tab dev show eth0</code></strong> GENERAL:eth0:ethernet:Intel Corporation:82567LM Gigabit Network Connection: @@ -274,7 +294,7 @@ nager/ActiveConnection/9</pre> </div> </div> <br class="example-break"><div class="example"> -<a name="id-1.2.9.6.12"></a><p class="title"><b>Example 11. nmcli usage in a NetworkManager dispatcher script to make Ethernet and Wi-Fi mutually exclusive</b></p> +<a name="id-1.2.5.6.13"></a><p class="title"><b>Example 12. nmcli usage in a NetworkManager dispatcher script to make Ethernet and Wi-Fi mutually exclusive</b></p> <div class="example-contents"> <pre class="programlisting"> #!/bin/bash @@ -312,7 +332,7 @@ fi </div> <br class="example-break"><p><span class="bold"><strong>Example sessions of interactive connection editor</strong></span></p> <div class="example"> -<a name="id-1.2.9.6.14"></a><p class="title"><b>Example 12. Adding an ethernet connection profile in interactive editor (a)</b></p> +<a name="id-1.2.5.6.15"></a><p class="title"><b>Example 13. Adding an ethernet connection profile in interactive editor (a)</b></p> <div class="example-contents"> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>nmcli connection edit type ethernet</code></strong> @@ -550,7 +570,7 @@ Connection 'ethernet-4' (de89cdeb-a3e1-4d53-8fa0-c22546c775f4) successfully <br class="example-break"> </div> <div class="refsect1"> -<a name="id-1.2.9.7"></a><h2>See Also</h2> +<a name="id-1.2.5.7"></a><h2>See Also</h2> <p> <a class="link" href="nmcli.html" title="nmcli"><span class="citerefentry"><span class="refentrytitle">nmcli</span>(1)</span></a>, <a class="link" href="NetworkManager.html" title="NetworkManager"><span class="citerefentry"><span class="refentrytitle">NetworkManager</span>(8)</span></a>, |