Situatie
Linux OS has the capability of running not weeks yet years without a reboot. But sometimes there is a good reason to reboot your Linux system after a week or two depending upon the situation. Mostly there are two major reasons for the reboot. First, the reboot becomes necessary when you install a piece of software that requires a reboot to become functional. Secondly, when you update your system or perform some configurations that also requires a reboot. Other then these, there can be many other reasons for a reboot. Whatever the reason may be, you should know how to reboot a system for all the changes to take effect.
Solutie
Pasi de urmat
Using reboot command
The quickest way to reboot Debian OS is by using the reboot command. It powers-off and then performs a reboot of a local host or a remote Debian machine.
To use this command in Debian for a reboot, first we have to launch the Terminal application in Debian. To do so, go to the Activities tab located on the top left corner of your desktop. Then in the search bar, type terminal. When the Terminal icon appears, click on it to launch it.
Then in the Terminal, type the following command:
$ sudo reboot
It will immediately power off and then restart the system.
You can also forcefully reboot a system if the reboot command itself might not work. It is similar to pressing the power button of your laptop or PC. Type the following command in Terminal to reboot your system forcefully:
$ reboot –f
Using shutdown command
The shutdown command in Linux as the name implies is used to power off the system. But if we use –r flag with it, we can use it to reboot the system. Using this command, we also have to add the time argument to tell when to restart the system. Make note that we have to mention the time in minutes.
The syntax of the command to reboot would be:
$ sudo shutdown -r +[time]
When the above command is entered without any time argument, the system will reboot after one minute using the default settings.
$ sudo shutdown -r
To reboot the system immediately, use the following command:
$ sudo shutdown -r now
You can also schedule the restart by defining time in minutes.
For instance to schedule a restart after 2 minutes from now, use the below command:
$ sudo shutdown -r +2
To schedule a restart at an exact time e.g 2:10 PM, you can use:
$ sudo shutdown -r 14:10
If you have set up a scheduled reboot, but later you want to cancel it, you can do it using the –c flag. Run the following command in Terminal to cancel a scheduled restart.
$ sudo shutdown –c
Leave A Comment?