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?
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?
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.2; KDE Plasma 5.18.5;
How do I pipe | all the processes names to systemd?
I tried zypper ps -s | grep "service", but that didn't work. Any way to search for services using zypper ps -s?
I might have misunderstood;
I usually reboot -- like nrickert.
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.2; KDE Plasma 5.18.5;
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.
Bookmarks