Ubuntuで実行中のサービスを確認する方法
Ubuntuでは、systemctlコマンドを使用してアクティブなサービスを表示できます。次に、一般的に使用されるコマンドを示します。
- 利用可能なすべてのサービスを確認する:
systemctl list-units --type=service --state=running
- 特定のサービスの状態確認:
systemctl status <service_name>
例えば、Apache2 の状態を確認するには
systemctl status apache2
- 有効なすべてのサービスをリストする:
systemctl list-unit-files --type=service --state=enabled
これらのコマンドを使用すると、サービスの状態、有効化状態、その他の関連情報を表示できます。