RHEL8.6 systemctlで有効・無効なサービス一覧を取得する

環境
# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.6 (Ootpa)

操作方法
1.systemctlで有効・無効なサービス一覧を表示する
# systemctl list-unit-files -t service >>result.txt

2.起動時に有効化されるサービスの一覧は以下のコマンドで表示できます。
# systemctl list-unit-files -t service | grep enabled >>result.txt

3.起動時には無効化されるサービスの一覧は以下のコマンドで表示できます。
# systemctl list-unit-files -t service | grep disabled >>result.txt