Ubuntu 20.04でserviceの一覧を取得

2021年10月31日

1.OSバージョンを確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"

2.以下のコマンドで一覧を取得

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# systemctl list-unit-files --type=service
# systemctl list-unit-files --type=service
# systemctl list-unit-files --type=service

実行結果

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
NIT FILE STATE VENDOR PRESET
accounts-daemon.service enabled enabled
acpid.service disabled enabled
alsa-restore.service static enabled
alsa-state.service static enabled
NIT FILE STATE VENDOR PRESET accounts-daemon.service enabled enabled acpid.service disabled enabled alsa-restore.service static enabled alsa-state.service static enabled 略
NIT FILE                                  STATE           VENDOR PRESET
accounts-daemon.service                    enabled         enabled
acpid.service                              disabled        enabled
alsa-restore.service                       static          enabled
alsa-state.service                         static          enabled
略

 

Ubuntu 20.04

Posted by arkgame