KliLinux修改IP地址
阿新 • • 發佈:2020-11-18
1.先看一下有幾塊網絡卡
輸入:ifconfig -a
那個箭頭指向的就是網絡卡
2.修改該網絡卡的IP
輸入:/etc/network/interfaces
根據下面的內容改成你的,寫好之後ESC :wq 儲存並退出
auto eth0 iface eth0 inet static address 172.16.2.220 //IP netmask 255.255.255.0 //子網掩碼 gateway 172.20.20.248 //閘道器
3.新增DNS解析
輸入:vim /etc/resolv.conf
根據需求改成你的DNS設定,之後一樣儲存並退出
#Generated by NetworKManager nameserver 202.97.224.68 nameserver 202.97.224.68 nameserver 114.114.114.114 nameserver 8.8.8.8