List of content you will read in this article:
You were tired of windows! It's ok; we all get tired sometimes. Now you are using Linux-based operating systems like Ubuntu, and you don’t know how to reboot your device. Linux-based operating systems do not require reboots as often as Windows does. However, there are times when you need to reboot Ubuntu. If you are in one of these situations, this article is for you! Stay with us and follow our step-by-step guide to solve your problems.
Why do we need to reboot Ubuntu?
As we mentioned earlier, Operating systems like Ubuntu do not require scheduled reboots. With all that said, there are some times when rebooting will be your only option. Let’s talk about these special times before getting into our guide.
A kernel panic is an error from which your device's operating system (OS) cannot rapidly or easily recover. Kernel Panic starts when a low-level error occurs, and the operating system's kernel cannot repair it.
The whole concept of it is not bad, though! Your operating system uses a kernel panic to notify users of a problem and prevent more problems. During a kernel panic, the operating system writes the contents of the kernel memory to disk, commonly known as a kernel dump. It also terminates all CPU activities. The operating system either reboots automatically or waits for the user to reboot manually to restart operations.
Resizing the Root Partition
You might want to resize your root partition for whatever reason in your Ubuntu-powered device. There are different methods to resize your root partition; we will not discuss them in this article. Remember that no matter your chosen method, you’ll always need to reboot Ubuntu.
Kernel Updates or Security patches
If you use a Linux distribution such as Ubuntu, you are also utilizing the Linux kernel, which is the core that makes your OS a Linux-based one. For those unfamiliar with these terms, Windows has its kernel that its operating systems use, but because Linux is more modular, it is more widely discussed because so much can be done with it.
For example, you could take the kernel, patch it with several corrections, modify other settings, remove whatever you won't need, and then replace your original kernel with your finished product. It will work well (assuming it was done right). What makes Linux excellent is the ability to easily replace a part with something else without trouble. But the Kernel update process, whether manual or automated, must reboot afterwards.
This problem is more common among users. Your device can sometimes get slow or unresponsive due to some components malfunctioning. The first and most effective solution is to reboot Ubuntu and see if the problem is fixed.
Another problem with most devices is overheating in some circumstances. Though it’s a common problem, most people leave their device until it cools down, while their best option is to reboot the whole system. Rebooting your device will close all apps and background tasks which will give your device enough space to cool down.
Let’s start to see how we can reboot Ubuntu.
Now that we know which problems can be fixed with a simple reboot, we can dive into our step-by-step guide. We’ll cover all options available, going from the easiest to more complex ways.
Use reboot button
The reboot button is, of course, the easiest and quickest method to reboot Ubuntu. The 'Power Off / log Out' option may be found by clicking on the top right corner of your Ubuntu-powered device. Click on this option and find the Power Off option at the end of the list. By clicking on Power Off, a new window will pop up. There are three options in this window. Choose restart and confirm the process.
You can open this power options window by typing 'reboot' into the Gnome search bar. Another option is to press the power button, which will open the Power Off window. However, note that this may need first adjusting the power button functionality from inside the system settings!
Use reboot command
The reboot command is the quickest and easiest way to reboot a machine from the terminal. To reboot Ubuntu, enter the following command:
Believe it or not, this command is a shortcut for 'shutdown -r now'!
Use the shutdown command to reboot
The Shutdown command can shut down, turn off, or restart a computer. It specifies the execution time with a time parameter. For instant operation, the time input is 'now'.
For example, to restart a system instantly, use the '-r' flag in conjunction with the 'now' string:
$ sudo shutdown -r now
If you want to plan your reboot, you have to change the command above and a time parameter:
$ sudo shutdown -r 5
Remember that the time format is Hour: Minutes on a 24-hour clock. We may also use '+m' to restart the computer in 'm' minutes.
Use ‘Init’ in the command.
The '/sbin/init' command is the first process that runs when the kernel is loaded in Linux-based operating systems, which denotes that the process has PID 1.
In Linux systems without 'systemd,' the 'init' command stops all active processes and then synchronizes the disks before altering init states or run levels. The default run level is level 5. The 'init 6' command stops the running system and restarts it in the state specified in '/etc/inittab'. So, use the following command to restart:
$ sudo init 6
If you wish to reboot Linux Ubuntu into a multiuser mode, you may use the command below:
$ sudo init 2
Use ‘SYSTEMD’ command
Nowadays that 'Systemd' has replaced the init process, '/sbin/init' is only a symbolic link to systemd. That is why you can’t locate '/etc/inittab' on systems that use systemd rather than the init system. In such a circumstance, run the following command to restart the system:
$ sudo systemctl reboot
Systemd, like the SysV init system, employs the so-called "target" mechanism. The 'systemctl' command mentioned above is the principal interface to systemd. The "reboot.target" in systemd corresponds to runlevel 6 of the SysV init system. As a result, the above reboot command may also be used as:
$ sudo systemctl isolate rescue.target
Last words on how to reboot Ubuntu
We've learned about many methods to reboot the Ubuntu system in this article of ours. Remember that all commands are essentially the same for other Linux distributions, so this tutorial may also be used for them.
Now it's your turn to share your thoughts on this matter. Tell the other users in the comment section if you know of any other method. Oh, and don’t forget to read our articles on the website.