#navi(../)
* systemdのserviceタイプ一覧を表示する方法 [#vee8d244]
systemdのservice一覧を確認するコマンドを以下に記します。
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
* 関連記事 [#kc2f5caa]
-[[CentOS7でランレベルを変更する方法>CentOS/CentOS7でランレベルを変更する方法]]
-[[chkconfigはsystemctlに変更>CentOS/chkconfigはsystemctlに変更]]
-[[systemdでunit一覧を確認する方法>CentOS/systemdでunit一覧を確認する方法]]
-[[systemdのランレベル対応表>systemd/systemdのランレベル対応表]]
-[[systemdのserviceタイプ一覧を表示する方法>systemd/systemdのserviceタイプ一覧を表示する方法]]
-[[systemdのサービスログを確認する方法・journalctl>systemd/systemdのサービスログを確認する方法・journalctl]]
* serviceタイプ一覧を表示 [#a9fd1eae]
すべてのサービスタイプ一覧を表示するには以下のコマンドを実行します。
systemctl list-unit-files -t service
上記コマンドの実行結果例を記します。
$ systemctl list-unit-files -t service
UNIT FILE STATE
abrt-ccpp.service enabled
abrt-oops.service enabled
abrt-pstoreoops.service disabled
abrt-vmcore.service enabled
abrt-xorg.service enabled
abrtd.service enabled
accounts-daemon.service enabled
alsa-restore.service static
alsa-state.service static
alsa-store.service static
anaconda-direct.service static
anaconda-nm-config.service static
anaconda-noshell.service static
<snip>
** device unitの一覧表示 [#v9b5cf80]
device unitの一覧表示をする場合は以下のコマンドを実行します。
systemctl list-units -t device -l
上記コマンドの実行結果例を記します。
$ systemctl list-units -t device -l
UNIT
sys-devices-pci0000:00-0000:00:01.1-ata3-host2-target2:0:0-2:0:0:0-block-sr0.dev
sys-devices-pci0000:00-0000:00:03.0-net-enp0s3.device
sys-devices-pci0000:00-0000:00:08.0-net-enp0s8.device
sys-devices-pci0000:00-0000:00:0d.0-ata1-host0-target0:0:0-0:0:0:0-block-sda-sda
sys-devices-pci0000:00-0000:00:0d.0-ata1-host0-target0:0:0-0:0:0:0-block-sda-sda
sys-devices-pci0000:00-0000:00:0d.0-ata1-host0-target0:0:0-0:0:0:0-block-sda.dev
sys-devices-platform-serial8250-tty-ttyS0.device
sys-devices-platform-serial8250-tty-ttyS1.device
sys-devices-platform-serial8250-tty-ttyS2.device
sys-devices-platform-serial8250-tty-ttyS3.device
sys-devices-virtual-block-dm\x2d0.device
sys-devices-virtual-block-dm\x2d1.device
<snip>
** mount unitの一覧表示 [#ef7733f9]
mount unitの一覧表示をする場合は以下のコマンドを実行します。
systemctl list-units -t mount
上記コマンドの実行結果例を記します。
$ systemctl list-units -t mount
UNIT LOAD ACTIVE SUB DESCRIPTION
-.mount loaded active mounted /
boot.mount loaded active mounted /boot
dev-hugepages.mount loaded active mounted Huge Pages File System
dev-mqueue.mount loaded active mounted POSIX Message Queue File Syst
proc-fs-nfsd.mount loaded active mounted NFSD configuration filesystem
sys-kernel-config.mount loaded active mounted Configuration File System
sys-kernel-debug.mount loaded active mounted Debug File System
var-lib-nfs-rpc_pipefs.mount loaded active mounted RPC Pipe File System
<snip>
** swap unitの一覧表示をする場合は以下のコマンドを実行します。 [#lffbe631]
systemctl list-units -t swap
上記コマンドの実行結果例を記します。
$ systemctl list-units -t swap
UNIT LOAD ACTIVE SUB DESCRIPTION
dev-dm\x2d0.swap loaded active active /dev/dm-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.
1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
以上、systemdのservice unit一覧を確認する方法でした。
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)