debian8系統(tǒng)如何通過修改interfaces文件配置網(wǎng)卡?本教程以debian8系統(tǒng)為例
本配置適用于debian8,9版本
1.設(shè)置IP地址、網(wǎng)關(guān)
vi /etc/network/interfaces #編輯網(wǎng)卡配置文件
iface eth0 inet static #static表示使用固定ip,dhcp表述使用動態(tài)ip
address X.X.X.X #設(shè)置ip地址
netmask X.X.X.X #設(shè)置子網(wǎng)掩碼
gateway X.X.X.X. #設(shè)置網(wǎng)關(guān)
配置完成后保存退出即可:wq
2.重啟網(wǎng)絡(luò)
service networking restart #重啟網(wǎng)絡(luò)
ip a查看即可