[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
failed!
设置静态ip:vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto enp3s0
iface enp3s0 inet static
address 192.168.0.162
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 192.168.0.1
然后重启 /etc/init.d/networking restart
报错:[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
failed!
提示命令:systemctl status networking.service查看
networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since 四 2019-08-29 15:42:17 CST; 1min 15s ago
Docs: man:interfaces(5)
Process: 13333 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=0/SUCCES
Process: 13498 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 13494 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-
Main PID: 13498 (code=exited, status=1/FAILURE)
8月 29 15:42:17 root2 systemd[1]: Starting Raise network interfaces...
8月 29 15:42:17 root2 ifup[13498]: RTNETLINK answers: File exists
8月 29 15:42:17 root2 ifup[13498]: Failed to bring up enp3s0.
8月 29 15:42:17 root2 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILUR
8月 29 15:42:17 root2 systemd[1]: Failed to start Raise network interfaces.
8月 29 15:42:17 root2 systemd[1]: networking.service: Unit entered failed state.
8月 29 15:42:17 root2 systemd[1]: networking.service: Failed with result 'exit-code'.
直接命令:ip addr flush dev enp3s0 && /etc/init.d/networking restart
ip addr flush dev ens33单独命令会断开远程连接
enp3s0是网卡名,根据自己的网卡更改名字