Debian 10 Buster
Sponsored Link

初期設定 : サービスの管理2019/07/10

[1] サービスの一覧を表示します。
# 現在起動しているサービスの一覧を表示 (--all を付けると全サービスがリストされる)

systemctl -t service

UNIT                            LOAD   ACTIVE SUB     DESCRIPTION
apparmor.service                loaded active exited  Load AppArmor profiles
blk-availability.service        loaded active exited  Availability of block devices
console-setup.service           loaded active exited  Set console font and keymap
cron.service                    loaded active running Regular background program processing daemon
dbus.service                    loaded active running D-Bus System Message Bus
systemd-udevd.service           loaded active running udev Kernel Device Manager
systemd-update-utmp.service     loaded active exited  Update UTMP about System Boot/Shutdown
systemd-user-sessions.service   loaded active exited  Permit User Sessions
user-runtime-dir@0.service      loaded active exited  User Runtime Directory /run/user/0
user@0.service                  loaded active running User Manager for UID 0

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

33 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

# サービスの起動設定の一覧を表示

systemctl list-unit-files -t service

UNIT FILE                              STATE
apparmor.service                       enabled
apt-daily-upgrade.service              static
apt-daily.service                      static
autovt@.service                        enabled
blk-availability.service               enabled
umountnfs.service                      masked
umountroot.service                     masked
urandom.service                        static
user-runtime-dir@.service              static
user@.service                          static
x11-common.service                     masked

133 unit files listed.
[2] もし自身の環境で不要なサービスがあれば、以下のようにして停止と自動起動のオフ設定をします。
下例では Apparmor を停止に設定しています。なお、サービス名末尾の [.service] は省略可能です。
systemctl stop apparmor

systemctl disable apparmor