1 <?xml version='
1.0'
?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2015 Zbigniew Jędrzejewski-Szmek
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id=
"networkctl" conditional='ENABLE_NETWORKD'
25 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
28 <title>networkctl
</title>
29 <productname>systemd
</productname>
33 <contrib>Documentation
</contrib>
34 <firstname>Zbigniew
</firstname>
35 <surname>Jędrzejewski-Szmek
</surname>
36 <email>zbyszek@in.waw.pl
</email>
42 <refentrytitle>networkctl
</refentrytitle>
43 <manvolnum>1</manvolnum>
47 <refname>networkctl
</refname>
48 <refpurpose>Query the status of network links
</refpurpose>
53 <command>networkctl
</command>
54 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
55 <arg choice=
"plain">COMMAND
</arg>
56 <arg choice=
"opt" rep=
"repeat">LINK
</arg>
61 <title>Description
</title>
63 <para><command>networkctl
</command> may be used to introspect the
64 state of the network links as seen by
65 <command>systemd-networkd
</command>. Please refer to
66 <citerefentry><refentrytitle>systemd-networkd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
67 for an introduction to the basic concepts, functionality, and
68 configuration syntax.
</para>
72 <title>Options
</title>
74 <para>The following options are understood:
</para>
80 <option>--all
</option>
84 <para>Show all links with
<command>status
</command>.
</para>
88 <xi:include href=
"standard-options.xml" xpointer=
"help" />
89 <xi:include href=
"standard-options.xml" xpointer=
"version" />
90 <xi:include href=
"standard-options.xml" xpointer=
"no-legend" />
91 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
97 <title>Commands
</title>
99 <para>The following commands are understood:
</para>
104 <command>list
</command>
108 <para>Show a list of existing links and their
109 status. Produces output similar to
<programlisting>
110 IDX LINK TYPE OPERATIONAL SETUP
111 1 lo loopback carrier unmanaged
112 2 eth0 ether routable configured
113 3 virbr0 ether no-carrier unmanaged
114 4 virbr0-nic ether off unmanaged
116 4 links listed.
</programlisting></para>
122 <command>status
</command>
123 <optional><replaceable>LINK...
</replaceable></optional>
127 <para>Show information about the specified links: type,
128 state, kernel module driver, hardware and IP address,
129 configured DNS servers, etc.
</para>
131 <para>When no links are specified, routable links are
132 shown. See also option
<option>--all
</option>.
</para>
134 <para>Produces output similar to
137 Address:
10.193.76.5 on eth0
138 192.168.122.1 on virbr0
139 169.254.190.105 on eth0
140 fe80::
5054:aa:bbbb:cccc on eth0
141 Gateway:
10.193.11.1 (CISCO SYSTEMS, INC.) on eth0
143 8.8.4.4</programlisting></para>
150 <command>lldp
</command>
154 <para>Show LLDP (Link Layer Discovery Protocol)
162 <title>Exit status
</title>
164 <para>On success,
0 is returned, a non-zero failure
165 code otherwise.
</para>
169 <title>See Also
</title>
171 <citerefentry><refentrytitle>systemd-networkd.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
172 <citerefentry><refentrytitle>systemd.network
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
173 <citerefentry><refentrytitle>systemd.netdev
</refentrytitle><manvolnum>5</manvolnum></citerefentry>