[SOLVED] What would be the difference between a reboot and killing all existing processes?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What would be the difference between a reboot and killing all existing processes?
Hello.
I was reading about killing processes in linux and found the killall to be different in Solaris than in any other distribution. As you very well know, running killall in Solaris will kill all existing processes. And I was thinking, what would be the difference between rebooting a linux machine and just killing every process (leaving it similar to a rebooted state)?
Either way, they don't exist in Linux because Linux manages memory properly, and this is precisely the reason why an Android phone can run for months/years between reboots.
Killall (as most commonly implemented in Linux) may not in fact actually kill all (or any) processes! It sends a signal (generally sigterm if not spcified, check the man page for your implementation) to all running user processes and the return value indicates success if AT LEAST ONE process actually exits. Note that many server processes and the kernel are not even considered in most implementations. Other processes process the signal as they are coded to do, which may or may not result in an exit.
A reboot flushes all queues, resets all hardware devices, and starts server processes to include the kernel to the warm-boot level. Only a cold boot gives you a more clean system state.
The difference is significant, but how significant for your purposes depends upon what your purpose IS!
if you could successfully kill all (I mean every single) process, you'd have to reboot the host because it would be unusable. The command killall doesn't meant to do that, see post #5.
Reboot does much more, it's not just a kill command, that's the difference.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.