惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 三瑞

idea 安装cline openclaw 允许局域网能访问 VirtualBox 共享文件夹配置指南(Ubuntu 24.04 不重启方案) Nginx+Bearer Key 保护 Ollama + OpenClaw 远程连接 ubuntu24.04 安装 vscode Ubuntu 24.04 安装 KVM 完整指南 - 三瑞 Linux下Ollama + AMD ROCm GPU加速安装实操指南 - 三瑞 Ubuntu 24.04 挂载第二块磁盘并扩展 LVM 系统盘 openclaw qqbot 反复提示 ubuntu 终端代理设置 干货|xrdp 无人值守+同屏稳定配置(Ubuntu 22.04/24.04 实测可用) openclaw 使用不同的模型 AMD GPU (RX 7900 XTX) 使用情况查看 Ubuntu 24.04 自带GNOME RDP远程连不上?一招解决xrdp残留冲突问题 Ubuntu 24.04 磁盘空间管理:从查看到 LVM 动态扩容完整指南 避坑指南完整版:OpenClaw 连接 Ollama 详细实战教程 干货|Ubuntu 24.04 + AMD 7900 XTX 24G:Ollama 纯 Vulkan 加速部署(免 ROCm) Windows 连接 Ubuntu XRDP 远程桌面 QQ机器人接入OpenClaw完整指南:从零开始打造你的智能助手 VirtualBox U盘识别问题完美解决指南 ——记一次从入门到放弃再到入门的折腾历程 Ubuntu 系统 root 密码忘记怎么办?一招教你轻松重置 VirtualBox Ubuntu 虚拟机安装增强功能完整指南 HTTP 错误 500.21 - Internal Server Error 处理程序“BlockViewHandler”在其模块列表中有一个错误模块“ManagedPipelineHandler” 达梦数据库(DM)通过数据库类型生成修改字段类型的语句
Ubuntu 启动卡顿 2 分钟?一条命令解决
三瑞 · 2026-04-06 · via 博客园 - 三瑞

问题现象

Ubuntu 启动时在联网阶段卡住 2 分钟左右,进入系统后网络正常。

诊断

运行以下命令查看启动耗时:

systemd-analyze blame

如果输出显示 systemd-networkd-wait-online.service 占用 2 分钟,说明问题就是这个服务在等待网络超时。

原因

桌面版 Ubuntu 同时运行了 systemd-networkdNetworkManager 两个网络管理器,前者在启动时强制等待网络就绪,导致卡顿。

解决方案

方法一:禁用等待服务(推荐)

sudo systemctl disable systemd-networkd-wait-online.service
sudo systemctl disable NetworkManager-wait-online.service

重启即可。

方法二:完全禁用 systemd-networkd

如果你不需要该系统服务(桌面用户通常不需要):

sudo systemctl disable --now systemd-networkd
sudo systemctl disable systemd-networkd-wait-online.service

验证

重启后再次运行:

systemd-analyze time

启动时间应从 2 分 30 秒+ 降至 30 秒以内。

注意事项

  • 该操作不影响正常上网,网络仍会在后台自动连接

  • 仅禁用“等待网络”这一环节,不删除任何功能

  • 服务器用户若依赖 systemd-networkd 做网络配置,请使用方法一而非方法二