FedoraForum.org - Fedora Support Forums and Community
Page 1 of 3 123 LastLast
Results 1 to 15 of 32
  1. #1
    Join Date
    May 2011
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    systemctl list all services

    I'm trying to find the systemctl equivalent of "chkconfig --list".

    $ systemctl -t service -a

    looks like the command, but it does not return any line about the ntp service. It does exist because I get this:

    $ systemctl status ntpd.service
    ntpd.service - Network Time Service
    Loaded: loaded (/lib/systemd/system/ntpd.service)
    Active: inactive (dead)
    CGroup: name=systemd:/system/ntpd.service

    So I guess I really have two questions:
    1. what is the systemd "equivalent" to chkconfig --list
    2. why doesn't the above (systemctl -t service -a) return a line with the ntp service?

  2. #2
    Join Date
    Mar 2004
    Location
    In your closet
    Posts
    16,567
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Try
    PHP Code:
    systemctl list-units 
    Is that what you're looking for?

    Not to be a wise guy, but I got that from
    PHP Code:
    man systemctl 

  3. #3
    leigh123linux Guest

    Re: systemctl list all services

    Try running

    Code:
    su
    service ntpd start
    Then look again

  4. #4
    Join Date
    Aug 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    I think it's because NTP isn't enabled. I ran this to get NTP working:

    Code:
    % systemctl enable ntpd.service
    % systemctl --no-page -t service -a | grep ntp
    ntpd.service              loaded inactive dead        Network Time Service
    ntpdate.service           loaded inactive dead        Set time via NTP
    % systemctl start ntpd.service
    % systemctl --no-page -t service -a | grep ntp
    ntpd.service              loaded active   running     Network Time Service
    ntpdate.service           loaded inactive dead        Set time via NTP

  5. #5
    Join Date
    May 2011
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Quote Originally Posted by glennzo
    Try
    PHP Code:
    systemctl list-units 
    no that doesn't show the ntp service (unless it's enabled, see below).

    Quote Originally Posted by leigh123linux
    Try running

    Code:
    su
    service ntpd start
    Well that starts ntpd (which I did know how to do), it looks like the service command calls systemd to do the work.

    Quote Originally Posted by glroman
    I think it's because NTP isn't enabled. I ran this to get NTP working:

    Code:
    % systemctl enable ntpd.service
    % systemctl --no-page -t service -a | grep ntp
    ntpd.service              loaded inactive dead        Network Time Service
    ntpdate.service           loaded inactive dead        Set time via NTP
    % systemctl start ntpd.service
    % systemctl --no-page -t service -a | grep ntp
    ntpd.service              loaded active   running     Network Time Service
    ntpdate.service           loaded inactive dead        Set time via NTP
    Ok, so I guess the question is narrowed down now to: how do I list all "disabled" systemd services?

    chkconfig --list gave me output of _all_ services that are installed on the system and what their status was, whether they were "enabled"/"disabled".

    It seems the systemctl utility only ever shows "enabled" services... I could be wrong. So if so, how do I see which services are disabled?

  6. #6
    Join Date
    Jul 2006
    Location
    Montana
    Posts
    733
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    systemctl without any arguments will show information.

    Code:
    systemctl | grep ntp
    ntpd.service              loaded active running       Network Time Service
    See also http://0pointer.de/public/systemd-ebook-psankar.pdf
    If it is not broken, tweak it... If you break Fedora you get to keep both pieces :p

  7. #7
    Join Date
    May 2011
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Quote Originally Posted by bodhi.zazen
    systemctl without any arguments will show information.

    Code:
    systemctl | grep ntp
    ntpd.service              loaded active running       Network Time Service
    No. I am looking for "disabled" services.

    systemctl shows ntp here only because it's "active". Go ahead and run
    Code:
    systemctl stop ntpd.service
    and notice
    Code:
    systemctl | grep ntp
    comes back empty. I guess that systemctl by default only shows "active" "units". I want the "disabled" units.

    Quote Originally Posted by bodhi.zazen
    Thanks for the pdf pointer. AFAICT, they did not mention anywhere an equivalent to
    Code:
    chkconfig --list
    .

    Anyway, with what I've browsed through, I hacked up a shell script which kind of gives me what I'm after. I'd much rather have systemd tell me this info, since I'm sure what I did here is wrong.
    Attached Files Attached Files
    Last edited by balken; 31st August 2011 at 07:47 PM. Reason: newer script version

  8. #8
    Join Date
    Jul 2006
    Location
    Montana
    Posts
    733
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Quote Originally Posted by balken
    I'd much rather have systemd tell me this info, since I'm sure what I did here is wrong.
    Try the man page

    What is the output of

    Code:
    systemctl -a | grep ntp
    Is that what you are looking for ? The -a flag ?

    Keep in mind, systemd is not fully implemented and you may wish to consider filing a bug report / feature request if you have suggestions.

    ---------- Post added at 03:38 PM ---------- Previous post was at 03:17 PM ----------

    Oh I see ntp is no longer listed if it is first disabled and then you reboot.

    I would file a bug report on that, be sure to mention a reboot as I really could not follow your problem from your original description.

    ---------- Post added at 04:17 PM ---------- Previous post was at 03:38 PM ----------

    From a chat on IRC:

    mezcalero bodhi_zazen: on f16 you can use "systemctl list-unit-files"
    mezcalero bodhi_zazen: that will list you all unit files and whether they are enabled
    mezcalero indepdentely of whether they are referenced/running
    So it looks as if this functionality is in the works.
    Last edited by bodhi.zazen; 30th August 2011 at 10:20 PM.
    If it is not broken, tweak it... If you break Fedora you get to keep both pieces :p

  9. #9
    Join Date
    May 2011
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Quote Originally Posted by bodhi.zazen
    ---------- Post added at 03:38 PM ---------- Previous post was at 03:17 PM ----------
    Oh I see ntp is no longer listed if it is first disabled and then you reboot.

    I would file a bug report on that, be sure to mention a reboot as I really could not follow your problem from your original description.
    Ah, I think in your case, ntpd.service was "disabled", but was still "active". After a reboot, you indeed wouldn't see ntpd listed, but would still see it before rebooting... If you did a "systemctl stop ntpd.service", then "systemctl|grep ntp" would be empty without having to reboot.

    Hope that was clear? Sorry, my explanation was a bit roundabout.

    Quote Originally Posted by bodhi.zazen

    ---------- Post added at 04:17 PM ---------- Previous post was at 03:38 PM ----------

    From a chat on IRC:
    So it looks as if this functionality is in the works.
    That is good news! Thanks for querying IRC.

  10. #10
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    15,370
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Another option is to yum install systemd-gtk then run systemadm and on the units tab pick "Show All Units"
    Last edited by marko; 31st August 2011 at 02:22 AM.

  11. #11
    Join Date
    Dec 2012
    Location
    East Coast
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    I am not used to this systemctl but am trying to learn

    I am running gnome

    I ran the cmd
    Code:
    systemctl list-units|grep [Gg]nome
    which does not list the window environment

    I just installed Xfce and want to enable it as the default

    thanks for any tips

    F17/Gnome

  12. #12
    Join Date
    Jul 2004
    Location
    Wake Forest, NC
    Age
    73
    Posts
    1,503
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Quote Originally Posted by marko
    Another option is to yum install systemd-gtk then run systemadm and on the units tab pick "Show All Units"
    Yum install systemd-gtk returns a not found error message. However, yum install systemd-ui works. It puts a "Services" entry in the "System" section of the Applications Menu.
    Last edited by StephenH; 8th April 2013 at 01:48 PM. Reason: More information
    StephenH

    "We must understand the reality that just because our culture claims certain things are true it does not mean they are!" --M. Liederbach

  13. #13
    Join Date
    Mar 2012
    Location
    West Lafayette, Indiana
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    http://fedoraproject.org/wiki/SysVin...emd_Cheatsheet

    i found this immensely useful during the transition

  14. #14
    Join Date
    Aug 2009
    Posts
    11,390
    Mentioned
    98 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Quote Originally Posted by techsupport
    I am not used to this systemctl but am trying to learn

    I am running gnome

    I ran the cmd
    Code:
    systemctl list-units|grep [Gg]nome
    which does not list the window environment

    I just installed Xfce and want to enable it as the default

    thanks for any tips

    F17/Gnome
    That is because there isn't a Gnome unit for systemd. Systemd doesn't start Gnome. It starts GDM which in turn starts Gnome.

    If you wish to start Xfce, then you can log into Xfce from GDM, or you can use a different display manager, like LightDM.

    If you wish to change to a completely different desktop manager, like LightDM, then you can change it using systemd.

    Code:
    systemd --force enable lightdm.service

  15. #15
    Join Date
    Dec 2012
    Location
    East Coast
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: systemctl list all services

    Thanks for the help
    what did we gain with systemctl ?

Page 1 of 3 123 LastLast

Similar Threads

  1. difference between service and systemctl
    By roger in forum F15 Development
    Replies: 1
    Last Post: 23rd April 2011, 02:05 AM
  2. Replies: 0
    Last Post: 9th September 2008, 02:23 PM
  3. Minimum List of Services/Processes
    By InfRecursion in forum Using Fedora
    Replies: 2
    Last Post: 10th August 2007, 03:38 AM
  4. minimum services list in runlevel 3
    By Wolle in forum Servers & Networking
    Replies: 4
    Last Post: 20th March 2007, 04:52 PM
  5. system-config-services services?
    By morganread in forum Using Fedora
    Replies: 2
    Last Post: 29th April 2005, 04:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •