Linux網絡設置-方法

vi /etc/network/interfaces

auto eth0
iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 192.168.12.222
netmask 255.255.255.0
gateway 192.168.12.1
dns-server 218.201.96.130

vi /etc/resolv.conf set dns
nameserver 192.168.12.1
nameserver 192.168.12.1

sudo ifdown eth0
sudo ifup eth0

發佈了20 篇原創文章 · 獲贊 10 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章