2

CentOS / RHEL 7

I'd like to see a list of services present on my system and which systemd target they'll automatically start for. Is that possible? I know I can run systemctl cat foo and check the WantedBy field value for an individual service but I was hoping to see a full list of everything.

Basically I'm looking for the systemd equivalent of chkconfig --list

3

Ah, nevermind. It looks like chkconfig still exists in a limited capacity on RHEL/CentOS 7 and has anticipated my question:

[foo@foobox ~] chkconfig

Note: This output shows SysV services only and does not include native
    systemd services.  SysV configuration data might be overridden by native
    systemd configuration. 

    If you want to list systemd services use `systemctl list-unit-files'.
    To see services enabled on particular target use
    `systemctl list-dependencies [target]'.

Sorry - I should have checked first. I just figured legacy stuff like chkconfig wouldn't exist in the newer OS's.

So while I can run a command using a specified individual target, I can't see a grand summary of launch status across all targets.

  • 1
    In part that's because the list of targets is arbitrary. System administrators can add targets of their own, can make anything the default, and can make any target a goal. – JdeBP Jan 11 '18 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.