$ 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
複製代碼