Ubuntu 虚拟机启动加速实用指南
一 宿主机与虚拟化平台优化
二 Ubuntu 系统内启动项精简
systemd-analyze blamesystemd-analyze critical-chainsystemd-analyze plot > startup.svgvboxadd.service(VirtualBox 增强功能,仅在需要时启动):sudo systemctl disable --now vboxadd.serviceplymouth-quit-wait.service(图形引导等待):sudo systemctl disable --now plymouth-quit-wait.serviceNetworkManager-wait-online.service(等待网络就绪):sudo systemctl disable --now NetworkManager-wait-online.serviceavahi-daemon.service(本地发现,非必需):sudo systemctl disable --now avahi-daemon.servicesnapd.service(若不使用 Snap 可禁用;会影响后续 Snap 安装/更新):sudo systemctl disable --now snapd.service三 磁盘与文件系统优化
/etc/fstab 中为根分区添加 noatime(减少写入):
UUID=xxxx / ext4 defaults,noatime 0 1elevator=deadline 并生成新配置:sudo update-grub。四 进阶场景与注意事项
disable --now 前,先了解其依赖:systemctl list-dependencies <service>;sudo systemctl enable --now <service> 恢复。