
The reboot command in Linux restarts the system. It helps apply updates, clear temporary issues, or reinitialize services.
This article covers the reboot command in detail and explains how to use it to restart a Linux system.
reboot Command SyntaxThe following is the syntax of the reboot command:
Where the OPTIONS affect how the system reboots.
You must be the root user or have sudo privileges to execute the reboot command.
reboot Command UsageThe reboot command without any options immediately restarts the system.
This command ends all processes, which may cause the unsaved changes to be lost. Once you run this command, your terminal session ends, and the system restarts.
reboot CommandThe reboot command invokes the systemd to connect to the init system to shut down the system, and then starts it. It performs all the activities the shutdown command performs before closing the system. You can change this behavior using the -f option discussed in the next section.
reboot Command OptionsYou can use the following options with the reboot command:
--force or -f: Forces the system to restart without executing the shutdown activities, like unmounting drives, or notifying logged-in users about the reboot.--no-wall: Skips printing the broadcast wall message. No logged-in user is notified about the reboot before their terminal sessions end.--no-sync or -n: Skips flushing the pending buffer data to disks. This is generally used in emergencies.--no-wtmp or -d: Skips the reboot entry that the reboot command otherwise writes in the /var/log/wtmp file.--wtmp-only or -w: Does not actually perform a system reboot; it just creates an entry for it in the /var/log/wtmp file.reboot Command AlternativesYou can use the following commands to reboot a Linux system:
In this article, you have learned about the reboot command, how to use it, how it works, and the different command options. Use the man reboot command to view the reboot manual page for more information.
0 Comments
Be the first to comment and share your perspective with the community.