Ubuntu启动时卡在network等待中如何跳过
在启动系统时Ubuntu会卡在 A start job is running for hait for Network to be Configured (1min 40s / no) 这里,需要等待很长时间影响开机速度,例如下图:
解决办法如下:
等系统启动完成后需要对“systemd-networkd-wait-online.service”文件进行修改跳过此检索选项;
1、先进入目录下:
cd /etc/systemd/system/network-online.target.wants/
2、修改文件systemd-networkd-wait-online.service的service部分添加超时的字段
#添加上超时时间(将超时时间设置为2秒)
TimeoutStartSec=2sec
3、修改完结果如下:
vim systemd-networkd-wait-online.service
[Unit]
Description=Wait for Network to be Configured
Documentation=man:systemd-networkd-wait-online.service(8)
DefaultDependencies=no
Conflicts=shutdown.target
Requires=systemd-networkd.service
After=systemd-networkd.service
Before=network-online.target shutdown.target
[Service]
Type=oneshot
ExecStart=/lib/systemd/systemd-networkd-wait-online
RemainAfterExit=yes
#添加上超时时间
TimeoutStartSec=2sec
[Install]
WantedBy=network-online.target
修改完成后重启电脑进行验证测试
本文地址:https://www.vps345.com/11559.html