multi-user.target中不使用networkmanager,上网需要手动设置后才可以,进行有线网线的设置:
or
- ip addr
,以下假设网卡名为
- ls /sys/class/net/
,实际中应替换为自己实际的名称。
- eth0
- /etc/network/interfaces
- auto eth0
- allow-hotplug eth0
- iface eth0 inet dhcp
- auto eth0
- iface eth0 inet static
- address 192.168.0.7
- netmask 255.255.255.0
- gateway 192.168.0.254
- sudo systemctl restart networking.service
得到 也可以参考这里:https://wiki.debian.org/NetworkConfiguration
- man interfaces
来源: http://www.cnblogs.com/samgg/p/7712136.html