1.sudo vim /etc/network/interfaces
2./etc/network/interfaces文件内容如下:
# The loopback network interface
auto lo
iface lo inet loopback
# network interface not managed by Network Manager
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.199(your Ip)
netmask 255.255.255.0
gateway 192.168.2.1(your gateway)
dns-nameservers 192.168.2.1(your dns)
重启即可完成
1.sudo vim /etc/network/interfaces
2./etc/network/interfaces文件内容如下:
# The loopback network interface
auto lo
iface lo inet loopback
# network interface not managed by Network Manager
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.199(your Ip)
netmask 255.255.255.0
gateway 192.168.2.1(your gateway)
dns-nameservers 192.168.2.1(your dns)
重启即可完成
举报