Ubuntu 开机慢(networking.service导致)

环境 Ubuntu 18.04 desktop

开机启动在5分钟左右,很慢

 

开机后输入以下命令,查看service消耗时间:

systemd-analyze blame

 结果显示我的 networking.service 消耗了4分半钟

 

解决方法,缩短timeout时间:

sudo gedit /lib/systemd/system/networking.service

将TimeoutStartSec设置为你想要的时间,我的是TimeoutStartSec=10s

 

再重启就正常了!

 

posted @ 2020-06-16 16:28  MyCPlusPlus  阅读(2950)  评论(0编辑  收藏  举报