@
5xX4U5sUwdELgdQ3 感谢你的整理,非常实用。
这里再 append 一些内容。
根据 Debian 文档 [4 ways to configure the network](
https://wiki.debian.org/NetworkConfiguration#A4_ways_to_configure_the_network) 目前 Debian 支持 4 种方式配置网络。
> - The interfaces configuration file at /etc/network/interfaces (this page): for basic or simple configurations (e.g. workstation)
> - [NetworkManager](
https://wiki.debian.org/NetworkManager): This is the default for Laptop configuration
> - Systemd: [Debian reference Doc Chapter 5](
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_modern_network_configuration_without_gui)
> - [Netplan](
https://wiki.debian.org/Netplan): [Debian reference Doc Chapter 5](
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_modern_network_configuration_for_cloud)
之前站内有讨论过不同工具间关系,可以参考 [Linux 下的网络管理服务太乱了,我现在都没搞明白之间的关系](
https://v2ex.com/t/834317)
我个人偏好 systemd , 一般会在配置网络前,把不同工具的配置文件清理一遍,防止互相影响。具体路径如下
- /etc/network/interfaces
- /etc/network/interfaces.d
- /etc/systemd/network
- /etc/netplan
NetworkManager 的配置文件在 /etc/NetworkManager ,我没动过好像也没影响。