The systemctl list-units -a does not show an enabled unit from RHEL8

Solution Unverified - Updated -

Issue

  • The systemctl list-units -a command could show the enabled unit in RHEL7 as below.
# vi /etc/systemd/system/test.service
# systemctl daemon-reload
# systemctl enable test.service
# systemctl list-units -a |grep test.service
  test.service     loaded    inactive dead      test
  • But, it's not output in RHEL8.
  • Why wasn't it output in RHEL8?

Environment

Red Hat Enterprise Linux (RHEL) 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content