$linuxjunkies
>

networkctl(1)

Query and control the state of the systemd network manager.

UbuntuDebianFedoraArch

Synopsis

networkctl [OPTIONS...] COMMAND [ARGS...]

Description

networkctl is a command-line utility to query and control systemd-networkd, which manages network configuration and connectivity. It provides status information about network interfaces, links, and addresses, and can be used to bring interfaces up or down.

The command operates on network links and can display detailed information about their configuration, IP addresses, DNS settings, and routing. It requires systemd-networkd to be running on the system.

Common options

FlagWhat it does
-a, --allShow all links, including those that are currently down
-s, --summaryPrint only a short summary for each link instead of detailed information
-n, --lines=NPrint the last N lines of output (useful for large output)
-l, --fullPrint the full output without truncating long strings
--no-pagerDo not pipe output into a pager; show all output on stdout
-j, --json=PRETTY|short|offOutput results as JSON; PRETTY for human-readable JSON
--no-legendDo not print column headers or footers in list output
-h, --helpShow help message and exit

Examples

Show a summary of all network links on the system

networkctl

Display detailed status information for all network links

networkctl status

Show detailed configuration and status for the eth0 interface

networkctl status eth0

List all network links in a table format

networkctl list

Bring up the eth0 interface (requires appropriate permissions)

networkctl up eth0

Bring down the wlan0 interface (requires appropriate permissions)

networkctl down wlan0

Show a brief summary of all links including those that are down

networkctl -a --summary

Output link status as JSON and extract DNS server information

networkctl status -j pretty | jq .DNS

Related commands