Static Networking

To configure a static IP on enp2s0, create static.network:

[Match]
Name=enp2s0

[Network]
Address=192.168.0.15/24
Gateway=192.168.0.1
DNS=192.168.0.1

Place the file in /etc/systemd/network/. To apply the configuration, run:

sudo systemctl restart systemd-networkd