Debian From Scratch(DFS)配置網絡步驟如下:
net-tools
(基礎網絡工具)、NetworkManager
(圖形界面管理,可選)。/etc/network/interfaces
,靜態IP示例:auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
DHCP示例:iface eth0 inet dhcp
。重啟服務:sudo systemctl restart networking
。wpasupplicant
,編輯/etc/network/interfaces
添加:auto wlan0
iface wlan0 inet dhcp
wpa-ssid "your_SSID"
wpa-psk "your_password"
或靜態IP配置,同時創建/etc/wpa_supplicant/wpa_supplicant.conf
文件。/etc/resolv.conf
,添加DNS服務器,如:nameserver 8.8.8.8
nameserver 8.8.4.4
ip addr show
查看接口狀態,ping www.google.com
測試連通性。說明:DFS網絡配置與標準Debian一致,優先使用/etc/network/interfaces
(傳統方法),若需圖形界面可安裝NetworkManager。