How to Set Up systemd-networkd on Linux for Wired Ethernet

systemd-networkd is systemd's built-in network manager for configuring Ethernet links, addresses, routes, bridges, VLANs, and other network devices. For a basic wired connection, the setup is straightforward: identify the interface, create a .network file, make sure no other manager owns the same interface, start systemd-networkd, and verify the result.

This guide uses DHCP on a wired Ethernet interface. If you are connected to the machine over SSH, use a local console or out-of-band management before changing network managers, because the handoff can temporarily drop the connection.

1. Check your Ethernet interface and current network manager

Start by listing links that systemd knows about:

networkctl list

Look for the wired interface, commonly named something like enp3s0, eno1, or eth0. You can also run ip link. Do not copy the example interface name blindly.

Linux terminal showing networkctl list with the Ethernet interface enp3s0 highlighted

Next, check whether NetworkManager is active:

systemctl status NetworkManager

NetworkManager and systemd-networkd can coexist when they manage different interfaces, but you should not let both manage the same Ethernet link. The current systemd.network documentation explains how .network files match interfaces and how networkd determines ownership.

Linux terminal checking NetworkManager and showing the command to disable it before handing the interface to systemd-networkd

2. Create a DHCP network profile

Local administrator profiles belong in /etc/systemd/network/. Create the directory if it does not already exist, then edit a file such as 20-wired.network:

sudo mkdir -p /etc/systemd/network
sudo nano /etc/systemd/network/20-wired.network

For a normal Ethernet connection that receives its address from your router or DHCP server, use:

[Match]
Name=enp3s0

[Network]
DHCP=yes

Replace enp3s0 with your actual interface. Files must end in .network. When several files match a link, systemd-networkd uses the first matching file in alphanumeric order, so a specific name such as 20-wired.network is easier to reason about than a broad catch-all.

Nano editor showing a systemd-networkd Ethernet profile with Match Name enp3s0 and DHCP enabled

Optional: use a static IPv4 address

If the machine needs a fixed address, replace DHCP=yes with values appropriate for your network:

[Match]
Name=enp3s0

[Network]
Address=192.168.1.50/24
Gateway=192.168.1.1
DNS=1.1.1.1
DNS=9.9.9.9

Do not reuse those sample addresses unless they match your subnet. The official systemd.network reference documents DHCP=, Address=, Gateway=, DNS=, and more advanced routing options.

3. Enable systemd-networkd

Once the profile is ready, enable networkd and start it immediately:

sudo systemctl enable --now systemd-networkd

If another service currently manages this same Ethernet interface, perform the handoff from a local console. For a host fully switching away from NetworkManager, you can stop and disable it with:

sudo systemctl disable --now NetworkManager

Do not disable NetworkManager when you still need it for Wi-Fi or other interfaces. systemd-networkd configures IP networking, but Wi-Fi authentication normally requires a separate component such as iwd or wpa_supplicant.

Linux terminal enabling systemd-networkd with systemctl enable --now

4. Configure DNS with systemd-resolved if needed

systemd-resolved is not a requirement for networkd itself, but it integrates well with networkd and can use DNS servers learned through DHCP. If your distribution is not already using another resolver, enable it:

sudo systemctl enable --now systemd-resolved

The systemd-resolved documentation recommends linking /etc/resolv.conf to its stub file when resolved is the system resolver. Check first:

readlink -f /etc/resolv.conf

If you intentionally want systemd-resolved to provide resolv.conf, use:

sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Do not replace /etc/resolv.conf if your distribution or another DNS tool is deliberately managing it.

Linux terminal enabling systemd-resolved, linking resolv.conf to the stub resolver, and checking resolvectl status

5. Reload the configuration and reconfigure the interface

After editing a .network file, reload networkd's configuration. You can then explicitly reconfigure the target link:

sudo networkctl reload
sudo networkctl reconfigure enp3s0

Replace enp3s0 with your interface name. The official networkctl manual documents both commands. A full systemctl restart systemd-networkd also reloads the service, but networkctl is usually the more targeted choice.

Linux terminal showing a systemd-networkd profile followed by networkctl reload and reconfigure commands

6. Verify that systemd-networkd is working

Check the interface status:

networkctl status enp3s0

For a healthy DHCP connection, you should see the link configured with an IP address, a default gateway, and usually DNS information.

networkctl status output showing enp3s0 configured, routable, and assigned an IPv4 address, gateway, and DNS server

Then confirm routing and connectivity:

ip route
ping -c 3 1.1.1.1

If the IP ping works but websites or hostnames do not resolve, test DNS with resolvectl query example.com when using systemd-resolved. If the interface stays unmanaged, recheck the [Match] name and make sure another network manager is not claiming the same device.

Linux terminal verifying systemd-networkd with networkctl status, ip route, and successful ping results

For advanced setups such as bridges, bonds, VLANs, tunnels, or virtual devices, see the official systemd-networkd service documentation and the related systemd.netdev and systemd.link references.

Leave a Comment

How to Record Speaker Output on Linux with Audacity

How to Record Speaker Output on Linux with Audacity

Capture Linux desktop audio in Audacity by routing its recording stream to your output device’s monitor source. Follow PulseAudio and PipeWire steps, export tips, and fixes for silent tracks.

How to Use Dropbox on Linux: Install and Sync Your Files

How to Use Dropbox on Linux: Install and Sync Your Files

Install Dropbox on Linux from the official package, sign in, sync a local folder, manage selective sync, and check status from the command line.

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

Install Inkscape from your Linux distribution’s repositories, the Ubuntu stable PPA, Snap, or Flathub, with current commands and notes for choosing a package source.

How to Find and Remove Duplicate Files on Linux With FSlint

How to Find and Remove Duplicate Files on Linux With FSlint

Use FSlint to scan selected Linux folders, review duplicate groups, and safely delete redundant files or learn when hard-link merging is appropriate.

How to Install SABnzbd on Linux and Configure It

How to Install SABnzbd on Linux and Configure It

Install SABnzbd on Ubuntu or Debian, or run it in Docker on another Linux host. Then open the web interface and configure your provider and download folders.

How to Install the Paper GTK Theme on Linux

How to Install the Paper GTK Theme on Linux

Install the Paper GTK theme from supported Linux repositories, enable it for GTK apps in GNOME Tweaks, and see what the legacy theme can and cannot change.

How to Install and Set Up Plex on OpenMediaVault with Compose

How to Install and Set Up Plex on OpenMediaVault with Compose

The old OpenMediaVault Plex plugin is archived. Set up Plex on OMV 8 with OMV-Extras, the Compose plugin, persistent storage, and Plex’s official container.

How to Clean and Speed Up Ubuntu Safely

How to Clean and Speed Up Ubuntu Safely

Clean and speed up Ubuntu with safe APT cleanup, storage checks, and startup controls that help free space and troubleshoot a sluggish desktop.

How to Install the Hiri Email Client on Linux

How to Install the Hiri Email Client on Linux

Install Hiri on Linux with its Snap package or official tarball, add a desktop launcher, and check supported accounts plus a warning about Hiri’s old Snap release.

How to Get System Specifications for a Linux PC

How to Get System Specifications for a Linux PC

Use Fastfetch and built-in Linux commands to check your distro, kernel, CPU, memory, graphics, storage, and connected devices, then save a clear report.