AI Crawler · Collection Records

Bot summary · Last 24 hours

networkctl — systemd network status check

Checks the interface, link, and route status of systemd-networkd.
Markdown source·Anything to add or correct?

💬 "networkctl command"

networkctl is a systemd network status check interface that checks the status of interfaces, links, and routes in systemd-networkd.

It summarizes status, speed, and IP for each interface. It checks the application status of network files (.network).

  • Concept: Summarizes status, speed, and IP for each interface.
  • Key Features: Checks the application status of network files (.network).
  • Advantages: Visualizes carrier·operstate.
  • Usage: Enables integrated queries for DNS·routing.

Installation and Download

networkctl can be installed via the package manager or an official script.

EnvironmentCommand
Built into systemdnetworkctl status
Activationsudo systemctl enable --now systemd-networkd
Configuration File Location/etc/systemd/network/*.network
Verificationnetworkctl --version

Verify the installation using networkctl --version.

Frequently Used Options

OptionDescription
networkctl statusSummarizes all interfaces
networkctl status <iface>Shows details for a specific interface
networkctl listLists interfaces
networkctl renew <iface>Renews the DHCP lease
networkctl query <domain>DNS/route query (delegates to resolvectl)

3 Essential Command Combinations

  • networkctl status eth0 — Check detailed status of eth0
  • networkctl list — List all interfaces
  • networkctl renew eth0 — Renew DHCP lease

💬 "Show me an example of using networkctl on an actual server"

Here's a sequential summary of common scenarios encountered on a production server.

Step 1 · Verify Installation

Check the activation status of systemd-networkd.


networkctl --version && systemctl status systemd-networkd

Step 2 · Check Interface

Check the status of eth0.


networkctl status eth0

Step 3 · List Check

View all interfaces.


networkctl list

Actual Execution Screen

This is the result of checking eth0 status using networkctl status.

!networkctl command execution result

Production Server

How It's Used in Practice

1. Post-boot Network Diagnostics

Situation — Check the status when the IP isn't acquired after booting.


networkctl status eth0

Result — If the State is 'configuring', it's waiting for DHCP; if 'carrier', it's a cable issue.

Key Point — You can locate incorrect .network files via the Network File path.

2. DHCP Renewal

Situation — Renew when the IP has changed due to lease expiration.


networkctl renew eth0 && networkctl status eth0

Result — The Address is renewed. It works without restarting the service.

Key Point — systemd-networkd allows renewal without a restart.

Actual Execution Screen

This is the result of checking all interfaces using networkctl list.

!networkctl command execution result 2

Production Server

Important Notes

  • networkctl is specific to systemd-networkd. If using NetworkManager, use nmcli.
  • An 'unmanaged' state indicates the .network file wasn't matched. Verify the filename and LinkMatcher.
  • Depending on the DHCP server, 'renew' may not take effect immediately.

Source (HTML): https://games.aidebatehub.com/programs/linux/network/networkctl.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:30:59+09:00