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.
This doesn’t seem to work on a live usb sadly.
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.
I am using kde, btw.
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:
# systemctl reboot `systemctl list-unit-files --type=service --state=enabled --all |sed -n '/enabled/s/ .*$/ /p' |tr -d '
'`
'`
Too many arguments.
Close… Ty.
Sorry, my bad. I meant “systemctl restart”, but it still might be too long. Please explain why you are doing this and not just “systemctl reboot” or somesuch – as I said it seems pointless.
# systemctl restart `systemctl list-unit-files --type=service --state=enabled --all |sed -n '/enabled/ s/.service.*$/ /p' | tr -d '
'`
I am trying to update my system because when I reboot it doesn’t seem to save. I may have to do this in the future when yast2 installer is fixed for my usb thumbdrive.
Hi,
Just an alternative using awk.
systemctl list-unit-files --type=service --state=enabled --all | awk '$NF == "enabled" {sub(/\.service/,"",$1); printf "%s ", $1}'
Would want to know why you would want to restart all services (a bit unusual).
If instead, you just want all services to pick up configuration changes you made without rebooting, then the following command will do that for you
systemctl daemon-reload
IMO the above is simple and works.
But, if you for some reason want only a specific service to pick up the changes and don’t interrupt all services, then you can append the service name to the end of the command.
TSU
Thanks, that lists all the files.
Sorry, I guess I don’t need to, I thought it might fix a bug. It won’t but I appreciate the help.
I am afraid that I still do not understand what is happening.
It seems that you downloaded a Tumbleweed-KDE-Live-Snapshot iso image, installing it on a USB flash drive. You then booted a machine usinf this USB drive.
Did you then use this TW-KDE-Live instance to install Tubleweed on a second USB device or fixed disk drive? Or are you trying to upgrade the read-only snapshot that you downloaded?
I didn’t know it was read only.