Ubuntu 18.04
Sponsored Link

初期設定 : サービスの管理2018/04/27

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

root@dlp:~#
systemctl -t service

UNIT                            LOAD   ACTIVE SUB     DESCRIPTION
accounts-daemon.service         loaded active running Accounts Service
apparmor.service                loaded active exited  AppArmor initialization
apport.service                  loaded active exited  LSB: automatic crash repor
atd.service                     loaded active running Deferred execution schedul
blk-availability.service        loaded active exited  Availability of block devi
console-setup.service           loaded active exited  Set console font and keyma
cron.service                    loaded active running Regular background program
dbus.service                    loaded active running D-Bus System Message Bus
.....
.....
.....
ufw.service                     loaded active exited  Uncomplicated firewall
unattended-upgrades.service     loaded active running Unattended Upgrades Shutdo
user@1000.service               loaded active running User Manager for UID 1000

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.

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

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

root@dlp:~#
systemctl list-unit-files -t service

UNIT FILE                              STATE
accounts-daemon.service                enabled
acpid.service                          disabled
apparmor.service                       enabled
apport-forward@.service                static
apport.service                         generated
apt-daily-upgrade.service              static
apt-daily.service                      static
atd.service                            enabled
.....
.....
.....
user@.service                          static
uuidd.service                          indirect
vgauth.service                         enabled
x11-common.service                     masked

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

root@dlp:~#
systemctl disable apparmor

関連コンテンツ