ubuntu系统下设置静态IP

改动 /etc/network/interfaces文件 加入下面内容


# The loopback network interface

auto lo eth0
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 192.168.0.200
        netmask 255.255.255.0
        gateway 192.168.0.1

allow-hotplug eth0:1
iface eth0:1 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.1

原文地址:https://www.cnblogs.com/mengfanrong/p/5212387.html