Add an administrator-created .network file for systemd-networkd.
Which path is appropriate?
Administrator-created systemd-networkd files belong under /etc/systemd/network with a .network suffix.
Detailed explanation
/etc/systemd/network/10-lan.networkCorrect. It is the standard administrator configuration directory.
Correct. It is the standard administrator configuration directory.
/etc/NetworkManager/10-lan.networkIncorrect. NetworkManager does not use this directory for .network files.
Incorrect. NetworkManager does not use this directory for .network files.
/etc/networkd.conf.d/10-lan.confIncorrect. This is not the standard per-interface .network path.
Incorrect. This is not the standard per-interface .network path.
/var/lib/systemd/network/10-lan.networkIncorrect. /var/lib is not the administrator configuration directory.
Incorrect. /var/lib is not the administrator configuration directory.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' '/etc/systemd/network/10-lan.network' | sed 's#^/etc/systemd/##'Expected result
network/10-lan.networkKey points
- /etc/systemd/network
- .network suffix
- Lexical matching order
Notes
- Environment: POSIX awkによるpath確認
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.