How do services work

Discussion in 'Pandora OS (SuperZaxxon GNU/Linux)' started by zoidberg51, Apr 15, 2016.

  1. zoidberg51

    zoidberg51 Still Fresh

    Joined:
    Sep 13, 2015
    Messages:
    7
    Hi,

    I was wondering how do services work.

    Is there a command I can use to start and stop services?

    Thanks, Shaun.
     
    Tags:
  2. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,853
    Location:
    Somewhere off the coast of the EU
    Under a sysvinit system like the Pandora OS:

    /etc/init.d/NAME start|stop|restart|status|reload

    On a systemd system like Pyra OS:

    systemctl start|stop|restart|status|reload NAME
     
  3. rygD

    rygD Nihilistic Mystic

    Joined:
    Feb 28, 2014
    Messages:
    7,273
    Location:
    Everywhere
    SEE! These are exactly the sort of problems systemd has introduced. This is exactly one of the issues I ran into when I first started using it.
     
    rSl likes this.
  4. TrashyMG

    TrashyMG Sarcasm Dispenser Staff Member

    Joined:
    Jan 18, 2010
    Messages:
    10,251
    RTFM and get over it.
     
    Red Ring Rico likes this.
  5. rygD

    rygD Nihilistic Mystic

    Joined:
    Feb 28, 2014
    Messages:
    7,273
    Location:
    Everywhere
    Ah, but see, that is only one minor and commonly seen problem, and they get much worse very quickly the more you look. I suppose if the only thing you care about is using it (instead of sharing, such as the back and forth between BSD and Linux, which is something I used to think was a great idea) there are no problems. Not only does it create more work for the people that have to learn to use systemd, it makes more work for those that don't. I suppose this is acceptable? To me, it is not.
     
  6. FIQ

    FIQ Member

    Joined:
    Apr 1, 2014
    Messages:
    96
    systemd has many issues, command syntax is not one of them
     
    levi likes this.
  7. slaeshjag

    slaeshjag ¯\_(ツ)_/¯

    Joined:
    Apr 8, 2010
    Messages:
    2,687
    Location:
    ~Stockholm, Sweden
    On a debian system I use the "service" command anyway, works more or less the same no matter what init system you use.
     
    rygD and levi like this.
  8. rygD

    rygD Nihilistic Mystic

    Joined:
    Feb 28, 2014
    Messages:
    7,273
    Location:
    Everywhere
    I used that a LOT in the past. Last time I tried was on a RHEL VM and it didn't work. I stopped using it pretty much immediately so that I wouldn't continue to rely on it and forget how things are done with systemd. Maybe it is just Red Hat that doesn't use it, or those VMs, since I don't know much about them other than they were used to teach all the new RHEL stuff. With previous versions I used "service" worked just fine.
     
  9. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,853
    Location:
    Somewhere off the coast of the EU
    I don't have a 'service' command in my sbin folder on Arch (where /sbin is just a symlink to /usr/bin anyway), and it doesn't seem to be a command in SZ either so I assume it's a Debian-ism. But it's worth knowing for those of us with plans to buy a Pyra.
     
  10. rygD

    rygD Nihilistic Mystic

    Joined:
    Feb 28, 2014
    Messages:
    7,273
    Location:
    Everywhere
    Maybe so. Other than CentOS and RHEL, every distro I remember using it with was Debian based.
     
  11. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    389
    Location:
    UK
    On Fedora I have the "service" command and it tells me what it's redirecting to, so maybe I'll remember some day.

    Code:
    # service NetworkManager restart
    Redirecting to /bin/systemctl restart  NetworkManager.service
    
     
    rygD likes this.
  12. rygD

    rygD Nihilistic Mystic

    Joined:
    Feb 28, 2014
    Messages:
    7,273
    Location:
    Everywhere
    So it is/was there in most/some Debian and Red Hat based distros.
     

Share This Page

Loading...