Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: How do I restart all processes using systemd?

  1. #1

    Question How do I restart all processes using systemd?

    I know zypper ps shows all the processes I want to restart but what command do I use to restart them all?

    How do I pipe | all the processes to systemd? Anyone know?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,355
    Blog Entries
    3

    Default Re: How do I restart all processes using systemd?

    If the only processes that need restarting are user processes (with you as the user), the logout followed by login is probably sufficient. If there are system processes, I do it the easy way -- I just reboot.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3

    Default Re: How do I restart all processes using systemd?

    Quote Originally Posted by nrickert View Post
    If the only processes that need restarting are user processes (with you as the user), the logout followed by login is probably sufficient. If there are system processes, I do it the easy way -- I just reboot.
    This doesn't seem to work on a live usb sadly.

  4. #4

    Default Re: How do I restart all processes using systemd?

    How do I pipe | all the processes names to systemd?

  5. #5

    Default Re: How do I restart all processes using systemd?

    I tried zypper ps -s | grep "service", but that didn't work. Any way to search for services using zypper ps -s?

  6. #6
    Join Date
    Apr 2016
    Location
    North America
    Posts
    537

    Default Re: How do I restart all processes using systemd?


  7. #7
    Join Date
    Apr 2016
    Location
    North America
    Posts
    537

    Default Re: How do I restart all processes using systemd?

    I might have misunderstood;
    I usually reboot -- like nrickert.

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,355
    Blog Entries
    3

    Default Re: How do I restart all processes using systemd?

    Quote Originally Posted by ryanbach View Post
    This doesn't seem to work on a live usb sadly.
    Rebooting always works, in the sense that all processes are restarted.

    After rebooting, if "zypper ps" still shows some processes using deleted files, then just ignore that. I'm currently using GDM for login. And, on Tumbleweed, there are always a few deleted files being used by "gdm". So that's just something "gdm" does. There's no need to restart it.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  9. #9

    Default Re: How do I restart all processes using systemd?

    Quote Originally Posted by nrickert View Post
    Rebooting always works, in the sense that all processes are restarted.

    After rebooting, if "zypper ps" still shows some processes using deleted files, then just ignore that. I'm currently using GDM for login. And, on Tumbleweed, there are always a few deleted files being used by "gdm". So that's just something "gdm" does. There's no need to restart it.
    I am using kde, btw.

  10. #10
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,257

    Default Re: How do I restart all processes using systemd?

    Is there a specific reason that you cannot simply reboot, or is this a file parsing exercise for amusement?
    Some services should be restarted by the user-owner, and others by root. If display-manager is restarted you will be logged out of KDE anyway. The kernel can only be changed by rebooting.

    You should be thinking of commands like sed, awk, and tr. For instance this might restart all the enabled service units -- and no I haven't tried it. and it's pretty pointless in the real world:
    Code:
    # systemctl reboot `systemctl list-unit-files --type=service --state=enabled --all |sed -n '/enabled/s/ .*$/ /p' |tr -d '\n'`
    --
    slàinte mhath,
    rayH

    ~ knowing the right answer is easier than knowing the right question.

Page 1 of 2 12 LastLast

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
  •