输入命令sudo vi /etc/network/interfaces,
    auto lo
    iface lo inet loopback
    #上面的是回环
    #网卡eth0的配置
    auto eth0
    #staic 静态IP
    iface eth0 inet static
    address 192.168.1.5
    netmask 255.255.255.0
    gateway 192.168.1.1