---
author: Abhishek Prakash
category: 技术
comments_data:
- date: '2019-08-17 14:42:14'
  message: 启动的可能有点久，因为用的是虚拟机Cent OS
  postip: 223.154.60.114
  username: 弑魘妖帝 [Chrome 76.0|Windows 7]
- date: '2019-08-18 14:09:49'
  message: 我的启动时间55s
  postip: 223.89.136.102
  username: 来自河南商丘的 Firefox 60.0|GNU/Linux 用户
- date: '2019-08-19 14:54:28'
  message: "henghai@debian:~$&nbsp; &nbsp;&nbsp;&nbsp;systemd-analyze blame<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;25.007s man-db.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;18.553s docker.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;10.776s apt-daily.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;10.085s
    snapd.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 9.087s ModemManager.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 7.993s logrotate.service<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 7.848s udisks2.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp; 7.562s NetworkManager-wait-online.service<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 6.875s nginx.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp; 6.664s accounts-daemon.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp; 4.237s networking.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp; 4.234s snapd.seeded.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
    4.204s avahi-daemon.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 4.190s
    lvm2-lvmpolld.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 4.009s
    vboxdrv.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 4.005s rsyslog.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 3.989s systemd-logind.service"
  postip: 111.47.22.71
  username: 程海 [Firefox 60.0|GNU/Linux]
- date: '2019-08-19 15:05:48'
  message: "debian10：<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 9.244s plymouth-quit-wait.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 3.499s docker.service<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 3.336s mysqld.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp; 3.045s vmware-tools.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp; 2.559s apt-daily.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
    2.174s vmware-tools-thinprint.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp; 2.147s man-db.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
    1.666s dev-sda1.device<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 1.462s
    apt-daily-upgrade.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 1.054s
    udisks2.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;938ms
    NetworkManager-wait-online.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;798ms
    logrotate.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;616ms
    apache2.service"
  postip: 122.4.249.36
  username: 来自山东的 Firefox 56.0|Windows 7 用户
- date: '2019-08-21 22:23:09'
  message: "~ systemd-analyze blame<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
    1.701s man-db.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 1.102s
    lvm2-monitor.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;961ms
    dev-sdb2.device<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;591ms
    systemd-udevd.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;562ms
    systemd-journald.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;524ms
    systemd-logind.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;163ms
    ldconfig.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;143ms
    systemd-udev-trigger.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;83ms systemd-journal-flush.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;77ms NetworkManager.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;74ms user@1000.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;70ms systemd-rfkill.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;"
  postip: 115.201.52.61
  username: 来自浙江台州的 Chrome 76.0|GNU/Linux 用户
- date: '2019-08-22 16:37:23'
  message: "ArchLinux 系统，用的 DWM 窗口管理器，启动 7 秒多点。<br />\r\n<br />\r\n$ systemd-analyze<br
    />\r\nStartup finished in 3.421s (kernel) + 3.697s (userspace) = 7.118s<br />\r\ngraphical.target
    reached after 3.694s in userspace<br />\r\n<br />\r\n$ systemd-analyze blame<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 2.024s lvm2-monitor.service<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 1.326s dev-sdb2.device<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;998ms systemd-logind.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;417ms systemd-udevd.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;366ms systemd-journald.service<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;236ms systemd-udev-trigger.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;164ms dhcpcd.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;111ms systemd-remount-fs.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;94ms sys-kernel-config.mount<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;84ms systemd-random-seed.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;75ms systemd-sysctl.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;67ms systemd-tmpfiles-setup-dev.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;66ms user@1000.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;47ms dev-mqueue.mount<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;41ms kmod-static-nodes.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;33ms systemd-tmpfiles-setup.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;32ms systemd-journal-flush.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;29ms sys-kernel-debug.mount<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;28ms dev-hugepages.mount<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;24ms tmp.mount<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;14ms systemd-tmpfiles-clean.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;13ms systemd-update-utmp.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;12ms user-runtime-dir@1000.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 8ms systemd-user-sessions.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5ms home-zp-.cache.mount<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 4ms var-cache.mount"
  postip: 222.44.86.175
  username: zplinux [Chrome 76.0|GNU/Linux]
- date: '2019-09-05 14:58:11'
  message: HQLM。
  postip: 106.37.233.66
  username: 来自北京的 Chrome 76.0|GNU/Linux 用户
- date: '2020-04-14 08:32:34'
  message: "_,met$$$$$gg.&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; chenghai@debian <br
    />\r\n&nbsp; &nbsp; ,g$$$$$$$$$$$$$$$P.&nbsp; &nbsp;&nbsp; &nbsp; ---------------
    <br />\r\n&nbsp;&nbsp;,g$$P&quot;&nbsp; &nbsp;&nbsp;&nbsp;&quot;&quot;&quot;Y$$.&quot;.&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;OS: Debian GNU/Linux 10 (buster) x86_64 <br />\r\n
    ,$$P'&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;`$$$.&nbsp;
    &nbsp;&nbsp;&nbsp;Host: B250-HD3 <br />\r\n',$$P&nbsp; &nbsp;&nbsp; &nbsp; ,ggs.&nbsp;
    &nbsp;&nbsp;&nbsp;`$$b:&nbsp; &nbsp;Kernel: 4.19.0-8-amd64 <br />\r\n`d$$'&nbsp;
    &nbsp;&nbsp;&nbsp;,$P&quot;'&nbsp; &nbsp;.&nbsp; &nbsp; $$$&nbsp; &nbsp; Uptime:
    22 mins <br />\r\n $$P&nbsp; &nbsp;&nbsp; &nbsp;d$'&nbsp; &nbsp;&nbsp;&nbsp;,&nbsp;
    &nbsp; $$P&nbsp; &nbsp; Packages: 3363 (dpkg), 7 (snap) <br />\r\n $$:&nbsp; &nbsp;&nbsp;
    &nbsp;$$.&nbsp; &nbsp;-&nbsp; &nbsp; ,d$$'&nbsp; &nbsp; Shell: bash 5.0.3 <br
    />\r\n $$;&nbsp; &nbsp;&nbsp; &nbsp;Y$b._&nbsp; &nbsp;_,d$P'&nbsp; &nbsp;&nbsp;
    &nbsp;Resolution: 1152x864, 1600x900 <br />\r\n Y$$.&nbsp; &nbsp; `.`&quot;Y$$$$P&quot;'"
  postip: 111.47.22.71
  username: 来自湖北的 Firefox 68.0|GNU/Linux 用户
- date: '2020-04-14 08:34:10'
  message: "systemd-analyze blame<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;40.204s
    man-db.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;23.052s snapd.seeded.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;15.840s snapd.service<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;14.419s apt-daily.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;13.762s logrotate.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;12.291s NetworkManager-wait-online.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;11.848s ModemManager.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;10.885s udisks2.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
    7.236s accounts-daemon.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
    5.869s avahi-daemon.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5.769s
    lvm2-lvmpolld.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5.703s
    NetworkManager.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5.503s
    wpa_supplicant.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5.499s
    systemd-logind.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5.498s
    lm-sensors.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5.492s rsyslog.service<br
    />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5.440s alsa-restore.service<br />\r\n&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 5.435s vboxdrv.service<br />\r\n&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp; 5.433s pppd-dns.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp; 4.419s teamviewerd.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
    3.675s dev-sda1.device<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 3.614s
    systemd-tmpfiles-setup.service<br />\r\n&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
    3.518s colord.service<br />\r\n<br />\r\n什么情况？"
  postip: 111.47.22.71
  username: 程海 [Firefox 68.0|GNU/Linux]
- date: '2023-03-19 19:13:05'
  message: "systemd-analyze time&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;  ✔  19:12:04 <br
    />\r\nStartup finished in 6.309s (firmware) + 513ms (loader) + 2.471s (kernel)
    + 3.066s (userspace) = 12.360s <br />\r\ngraphical.target reached after 3.065s
    in userspace.<br />\r\n ~  systemd-analyze blame&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp; ✔  19:12:10 <br />\r\n753ms dev-nvme0n1p3.device<br />\r\n605ms home-sirius-storage.mount<br
    />\r\n332ms systemd-tmpfiles-setup.service<br />\r\n328ms systemd-udev-trigger.service<br
    />"
  postip: 210.30.193.75
  username: 来自210.30.193.75的 Chrome 111.0|GNU/Linux 用户
- date: '2023-08-17 15:52:40'
  message: "5min 160ms archlinux-keyring-wkd-sync.service<br />\r\n&nbsp; &nbsp; 6.373s
    NetworkManager-wait-online.service<br />\r\n&nbsp; &nbsp; 1.476s updatedb.service<br
    />\r\n&nbsp; &nbsp;&nbsp;&nbsp;794ms dev-nvme1n1p2.device<br />\r\n&nbsp; &nbsp;&nbsp;&nbsp;671ms
    accounts-daemon.service<br />\r\n&nbsp; &nbsp;&nbsp;&nbsp;546ms mysqld.service<br
    />\r\n&nbsp; &nbsp;&nbsp;&nbsp;300ms boot.mount<br />\r\n&nbsp; &nbsp;&nbsp;&nbsp;282ms
    systemd-udev-trigger.service<br />\r\n&nbsp; &nbsp;&nbsp;&nbsp;243ms systemd-remount-fs.service<br
    />\r\n&nbsp; &nbsp;&nbsp;&nbsp;213ms systemd-modules-load.service<br />\r\n&nbsp;
    &nbsp;&nbsp;&nbsp;167ms user@1000.service<br />\r\n&nbsp; &nbsp;&nbsp;&nbsp;157ms
    systemd-vconsole-setup.service<br />\r\n&nbsp; &nbsp;&nbsp;&nbsp;150ms systemd-tmpfiles-setup-dev.service<br
    />\r\n&nbsp; &nbsp;&nbsp;&nbsp;145ms modprobe@fuse.servi"
  postip: 171.88.109.220
  username: 来自四川成都的 Chrome 114.0|GNU/Linux 用户
count:
  commentnum: 11
  favtimes: 2
  likes: 0
  sharetimes: 0
  viewnum: 12178
date: '2019-08-17 10:47:15'
editorchoice: false
excerpt: 但是如果你很想知道你的 Linux 系统需要很长时间才能启动完成呢？使用秒表是一种方法，但在 Linux 中，你有一种更好、更轻松地了解系统启动时间的方法。
fromurl: https://itsfoss.com/check-boot-time-linux/
id: 11238
islctt: true
largepic: /images/p/201908/17/104358s1ho8ug868hso1y8.jpg
permalink: /article-11238-1.html
pic: /images/p/201908/17/104358s1ho8ug868hso1y8.jpg.thumb.jpg
related: []
reviewer: wxy
selector: lujun9972
summary: 但是如果你很想知道你的 Linux 系统需要很长时间才能启动完成呢？使用秒表是一种方法，但在 Linux 中，你有一种更好、更轻松地了解系统启动时间的方法。
tags:
- 开机
- 时间
thumb: false
title: 你的 Linux 系统开机时间已经击败了 99% 的电脑
titlepic: true
translator: geekpi
updated: '2019-08-17 10:47:15'
---

当你打开系统电源时，你会等待制造商的徽标出现，屏幕上可能会显示一些消息（以非安全模式启动），然后是 [Grub](https://www.gnu.org/software/grub/) 屏幕、操作系统加载屏幕以及最后的登录屏。


你检查过这花费了多长时间么？也许没有。除非你真的需要知道，否则你不会在意开机时间。


但是如果你很想知道你的 Linux 系统需要很长时间才能启动完成呢？使用秒表是一种方法，但在 Linux 中，你有一种更好、更轻松地了解系统启动时间的方法。


### 在 Linux 中使用 systemd-analyze 检查启动时间


![](/images/p/201908/17/104358s1ho8ug868hso1y8.jpg)


无论你是否喜欢，[systemd](https://en.wikipedia.org/wiki/Systemd) 运行在大多数流行的 Linux 发行版中。systemd 有许多管理 Linux 系统的工具。其中一个就是 `systemd-analyze`。


`systemd-analyze` 命令为你提供最近一次启动时运行的服务数量以及消耗时间的详细信息。


如果在终端中运行以下命令：



```
systemd-analyze
```

你将获得总启动时间以及固件、引导加载程序、内核和用户空间所消耗的时间：



```
Startup finished in 7.275s (firmware) + 13.136s (loader) + 2.803s (kernel) + 12.488s (userspace) = 35.704s

graphical.target reached after 12.408s in userspace
```

正如你在上面的输出中所看到的，我的系统花了大约 35 秒才进入可以输入密码的页面。我正在使用戴尔 XPS Ubuntu。它使用 SSD 存储，尽管如此，它还需要很长时间才能启动。


不是那么令人印象深刻，是吗？为什么不共享你们系统的启动时间？我们来比较吧。


你可以使用以下命令将启动时间进一步细分为每个单元：



```
systemd-analyze blame
```

这将生成大量输出，所有服务按所用时间的降序列出。



```
7.347s plymouth-quit-wait.service
6.198s NetworkManager-wait-online.service
3.602s plymouth-start.service
3.271s plymouth-read-write.service
2.120s apparmor.service
1.503s [email protected]
1.213s motd-news.service
 908ms snapd.service
 861ms keyboard-setup.service
 739ms fwupd.service
 702ms bolt.service
 672ms dev-nvme0n1p3.device
 608ms [email protected]:intel_backlight.service
 539ms snap-core-7270.mount
 504ms snap-midori-451.mount
 463ms snap-screencloud-1.mount
 446ms snapd.seeded.service
 440ms snap-gtk\x2dcommon\x2dthemes-1313.mount
 420ms snap-core18-1066.mount
 416ms snap-scrcpy-133.mount
 412ms snap-gnome\x2dcharacters-296.mount
```

#### 额外提示：改善启动时间


如果查看此输出，你可以看到网络管理器和 [plymouth](https://wiki.archlinux.org/index.php/Plymouth) 都消耗了大量的启动时间。


Plymouth 负责你在 Ubuntu 和其他发行版中在登录页面出现之前的引导页面。网络管理器负责互联网连接，可以关闭它来加快启动时间。不要担心，在你登录后，你可以正常使用 wifi。



```
sudo systemctl disable NetworkManager-wait-online.service
```

如果要还原更改，可以使用以下命令：



```
sudo systemctl enable NetworkManager-wait-online.service
```

请不要在不知道用途的情况下自行禁用各种服务。这可能会产生危险的后果。


现在你知道了如何检查 Linux 系统的启动时间，为什么不在评论栏分享你的系统的启动时间？




---


via: <https://itsfoss.com/check-boot-time-linux/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出