1.输入命令
sudo nano /etc/network/interfaces
2.打开后是这样:
auto lo
iface lo inet loopback
iface eth0 inet dhcp.
auto wlan0
iface wlan0 inet dhcp
配置静态ip改为
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 114.114.114.114
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers x.x.x.x #你的本地dns地址
3.重启网络
sudo /etc/init.d/networking restart
Ubuntu静态IP配置教程
本文详细介绍了如何在Ubuntu系统中为eth0和wlan0网卡配置静态IP地址,包括修改配置文件、设置IP地址、子网掩码、网关及DNS等步骤,并提供了重启网络服务的方法。
3842

被折叠的 条评论
为什么被折叠?



