$ sudo cat /var/log/boot.log
复制代码
$ sudo systemctl list-unit-files --type=service | grep enabled
accounts-daemon.service enabled
anacron-resume.service enabled
anacron.service enabled
bluetooth.service enabled
brltty.service enabled
[...]
复制代码
#中止程序
$ sudo systemctl stop bluetooth.service
#禁止开机启动
$ sudo systemctl disable bluetooth.service
复制代码
$ sudo systemctl status bluetooth.service
bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:bluetoothd(8)
复制代码
Loaded: 开机时是否加载:enabled 开机启动,disabled 禁用开机启动; 默认启动状态(vendor preset: enabled)mysql
Active: 程序的运行状态:运行时(running)、中止(dead)sql
# 启动程序
$ sudo systemctl start bluetooth.service
# 开机自启
$ sudo systemctl enable bluetooth.service
复制代码
$ sudo systemctl mask bluetooth.service
Created symlink from /etc/systemd/system/bluetooth.service to /dev/null.
复制代码
注销后程序将不能被其余程序调用,(disabled无效时能够考虑使用)bash
$ sudo systemctl unmask bluetooth.service
复制代码
$ sudo systemd-analyze blame
8.708s gpu-manager.service
8.002s NetworkManager-wait-online.service
5.791s mysql.service
2.975s dev-sda3.device
1.810s alsa-restore.service
1.806s systemd-logind.service
1.803s irqbalance.service
1.800s lm-sensors.service
1.800s grub-common.service
复制代码
# 生成图表
$ systemd-analyze plot > plot.svg
#打开图片
$ eog plot.svg
复制代码