No file under the "/etc/systemd/network/" directory!

Hello,
According to the https://wiki.samba.org/index.php/Time_Synchronisation#With_systemd-timesyncd tutorial, I want to configure the time service on my Fedora server. I configured the static IP address with the “nmcli” command, but I can’t find any configuration file under the “/etc/systemd/network/” directory. What should I do?
My route information is:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.3.2        0.0.0.0         UG    101    0        0 enp0s8
10.0.3.0        0.0.0.0         255.255.255.0   U     101    0        0 enp0s8
192.168.56.0    0.0.0.0         255.255.255.0   U     100    0        0 enp0s17

I created a file manually:

# touch /etc/systemd/network/NIC.network

And filled that file with below lines:

[Network]
NTP=mydc.mydomain.z

[Address]
Address=192.168.56.7/24

[Route]
Destination=192.168.56.0/0
Gateway=0.0.0.0

Is it OK?

Thank you.

nmcli is the command line front end for NetworkManager. Which the configuration files are not to be edited directly.

systemd-networkd, the configuration files are under /etc/systemd/network . There is no configuration editing front end for systemd-networkd, do we need to manually create and edit the config files.

Normally we will not use systemd-networkd and NetworkManager at the same time.

1 Like