When do i need to reboot linux




















Is your existence on this plane within the absolute definition of necessity? I honestly don't know. Bit of a weird question to ask. This question was incomplete, or at least open-ended. When you throw around words like necessary , you need to give a context.

Many answers already assumed the OP meant highly desirable in a technical sense , so posted answers that fit contexts like necessary to avoid being hacked or necessary if your computer crashes. They're good answers. Adding another wasn't really warranted. But they say assumptions are the mother of all muck ups or something like that anyway so I peeled it back to absolute necessity.

If you insist on using an old copy of Simply installing new versions of a package does not result in the related services and applications being restarted. For example, if you are running Firefox while you install an updated package for it, then you will be notified within the browser when you switch back to it, that it needs to be restarted, after the update was installed.

Likewise, the kernel itself needs to be "restarted" when updates are applied for it. Because the kernel is the lowest level above the hardware, you do need to reboot the system, for the new kernel to be loaded.

For other services, they can be restarted without rebooting. An update to Unity or underlying libraries used by the services of the environment, will need you to log out and back in, to restart them. For system services, it may be possible to manually restart them after an update is applied, but doing so automatically could be very disruptive if you are trying to use the system. The only way to know absolutely certain if a certain action is necessary, is to know what the changes are, and what your risk is for not performing that action.

Security fixes obviously require more abrupt action than simple changes to other things, that you may never directly encounter. The more directly your computer is connected to the Internet, the more risk there is, as well.

You'll have to consider all the variables, and make a decision whether to reboot now, or later, when you install updates. Probably never but do read on. The Linux system is set up in such a way that after you updated the system where it would require a reboot to activate the new features ie.

Now if you want these new features active the easiest method of doing so is rebooting. But for all we care you keep working on this machine and reboot it the next weekend or the weekend after that. Or next christmas. Is it smart? Maybe not. But there is nobody stopping you from doing so. The system is smart enough to not accept the next update if the server has not rebooted yet. To me the only reasons where a reboot is necessary is after first install or when doing maintenance where single user is required think things like partitioning, fixing hard disk errors or when some idiot ran the famous fork bomb though that one could be fixed from the system itself.

For all other reboots to occur is at the grace of the administrator. And I can not call that "necessary". First of all, I appreciate this question because it will always be current. The other answers are correct and very detailed - that is why I go short. There are scenarios where a reboot is necessary, like after installing a new kernel. There are scenarios where it is recommended, like after the install of a new desktop. In most scenarios, like after installing or upgrading software rebooting is not necessary.

Whenever you are in doubt I recommend to perform a restart, so you are on the safe side. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. On many systems today, the shutdown command is actually just a call to systemctl with the appropriate reboot or power off option.

The reboot command, on its own, is basically a shortcut to shutdown -r now. From a terminal, this is the easiest and quickest reboot command:. If your system is being blocked from shutting down perhaps due to a runaway process , you can use the --force flag to make the system shut down anyway.

However, this option skips the actual shutting down process, which can be abrupt for running processes, so it should only be used when the shutdown command is blocking you from powering down. On many systems, reboot is actually a call to systemctl with the appropriate reboot or power off option. On Linux distributions without systemd , there are up to 7 runlevels your computer understands. Different distributions can assign each mode uniquely, but generally, 0 initiates a halt state, and 6 initiates a reboot the numbers in between denote states such as single-user mode, multi-user mode, a GUI prompt, and a text prompt.

The telinit command is the front-end to your init system. How unsafe this command is for your data depends entirely on your init configuration. Most distributions try to protect you from pulling the plug or the digital equivalent of that by mapping runlevels to friendly commands. To be thorough, I include here additional methods of bringing down a Linux computer, but by no means are these methods recommended.

If you try these methods, try them in a virtual machine. Otherwise, use them only in emergencies. You can communicate directly with this subsystem using key combinations, ideally regardless of what state your computer is in; it gets complex on some keyboards because the Sysrq key can be a special function key that requires a different key to access such as Fn on many laptops.

First, make sure that the Sysrq system is enabled:. This method is not a reasonable way to reboot your machine on a regular basis, but it gets the job done in a pinch.

Kernel parameters can be managed during runtime with sysctl. There are lots of kernel parameters, and you can see them all with sysctl --all. That situation is fairly typical since rebooting immediately on a catastrophic system crash makes it difficult to diagnose the cause of the crash. Now, should your computer experience a kernel panic, it is set to reboot instead of waiting patiently for you to diagnose the problem.

You can test this by simulating a catastrophic crash with sysrq. First, make sure that Sysrq is enabled:. Knowing all of these options doesn't mean that you should use them all.

Give careful thought to what you're trying to accomplish, and what the command you've selected will do. You don't want to damage your system by being reckless. That's what virtual machines are for. However, having so many options means that you're ready for most situations. Have I left out your favorite method of rebooting or powering down a system?

For me shutdown command is the most used in any case. But always is interesting to know other options available. Thanks for share. I think it was great that they get remapped appropriately across distros, as I use Slackware on my main workstation and RHEL or Fedora on my laptop. When your system is hopelessly frozen, the only option is to hold the power button in until it shuts off.

You may lose some data, but I save anything important that I'm working on at frequent intervals. You might use these when you are in the middle of something like compiling software or updating, which will take some time, but you know will be done after some interval.

Thanks Greg. I can't believe I left that out of the article! Shows you how rarely I schedule shutdowns, I guess. Why is it that In the GUI I can just click a couple of times to suspend or shutdown without being asked for the root password, yet trying to script something to do the same thing requires authorisation? In any case, I'm just one person. Don't take my thoughts on any of this as authoritative. Decide for yourself.

You said: "When you execute a command or when a process loads in a library, it pages the full contents into memory. How about the following? On a RHEL 7. I'm not sure what you're talking about here Harald. Can you say more? I haven't done any research on this; I'm just going based off what the startup scripts do. The udevd -d command doesn't seem to do anything at all, in contrast to what I demonstrated. It creates device nodes and retriggers the whole system, which will lead to unforseen side effects.

Is there a way to get it to put that output to a log somewhere? Comments Hello Community, I'd like to know how to figure out if a host needs to be rebooted after the installation of updates. By know I could use the following script to create a file if a reboot is necessary:! Kind regards, Joerg. Guru points. Log in to join the conversation. Siem Korteweg. Hello Jorg, Replacing executable files that are in use by processes is prohibited text file busy. Regards, Siem. Hello Siem, Thank you for your answer.

Regards, Joerg. Hello Joerg, Not entirely. Ah, thanks again. PH Community Member 27 points. Patty Hakala. Red Hat Guru points. Ryan Sawhill. Siem said: "Replacing executable files that are in use by processes is prohibited" The above statement isn't accurate or applicable to the problem at hand.

Here are some points for consideration: When you execute a command or when a process loads in a library, it pages the full contents into memory.



0コメント

  • 1000 / 1000