Hello everyone, today we will discuss “Linux reboot with terminal command – how it works“. Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds.
Linux reboot and restart with the terminal command
Basically, the Linuxsudo reboot can be restarted with the command. However, many use the shutdown command in combination with the -r option for “–reboot”.
Allows the PC to restart after one minute:
sudo shutdown -r
To restart immediately:
sudo shutdown -r 0
sudo shutdown -r now
To reboot Linux in 15 minutes:
sudo shutdown -r 15
To restart Linux at 23:00:
sudo shutdown -r 23:00
To display a reboot message to all users of the system:
sudo shutdown -r 23:00 “System reboot is imminent.”
To cancel the reboot :
shutdown -c
However, if the reboot is carried out immediately, you do not have enough time to cancel it.
Restart server with message to user:
shutdown -r +5
If this command is run on a server where users are logged in, they will see a message that the server will be shut down in 5 minutes. New logins are then prevented.
Restart remote Linux server:
First log in via SSH and enter the reboot command:
ssh root@remote-server-com /sbin/reboot
You can also combine the above commands with parameters – for example, schedule the server to shut down after 4 hours and display a message for the logged-in users.
The reboot command does not work
If the reboot command doesn’t work for some reason, check for syntax or spelling errors. If necessary, you can also go the classic route via the graphical user interface (Start menu > Restart) on local systems, provided one is installed or usable.
In an emergency, you can also press and hold the power button on the computer, but we do not recommend this practice. It should only be used if the server or PC no longer reacts at all.
If you have any other good tips for the reboot command, please let us know in the comments.
0 Comments