Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
编辑完 ip地址,要重启网络
sudo service network restart
结果返回错误,错误如下
Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
然后如上提示用命令
systemctl status network.service
root@localhost network-scripts]# systemctl status network.service
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since 六 2021-02-27 22:44:47 CST; 1min 28s ago
Docs: man:systemd-sysv-generator(8)
Process: 3289 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
CGroup: /system.slice/network.service
└─1502 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient--ens33.lease -pf /var/run/dhclient-ens33.pid -H localhost ens33
提示Active: failed ,
重新编辑
vi /etc/sysconfig/network-scripts/ifcfg-ens33
还是提示一样的错误,然后选择
systemctl stop NetworkManager
systemctl disable NetworkManager
然后重启网络:
systemctl start network.service
最后在从 ip addr 命令中查看IP和Mac地址发现可以了
参考 三种方法解决 Job for network.service failed. See 'system