ubuntu网络设置
修改/etc/network/interfaces文件
sudo gedit /etc/network/interfaces
贴出我的eth0设置,自己看情况修改:
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.145(ip地址)
netmask 255.255.255.0(子网掩码)
gateway 192.168.1.1(网关)
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1