在Debian系統(tǒng)中配置靜態(tài)IP地址的步驟如下:
sudo nano /etc/network/interfaces
iface eth0 inet static
address [靜態(tài)IP地址]
netmask [子網(wǎng)掩碼]
gateway [網(wǎng)關(guān)地址]
例如:
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers [DNS服務(wù)器IP地址]
例如:
dns-nameservers 8.8.8.8
保存配置文件并退出編輯器。
重新啟動(dòng)網(wǎng)絡(luò)服務(wù)以使更改生效:
sudo /etc/init.d/networking restart
完成以上步驟后,您的Debian系統(tǒng)將使用靜態(tài)IP地址進(jìn)行網(wǎng)絡(luò)連接。