If you changed your mind after scheduling a shutdown, you could always cancel this operation by executing the following command: sudo shutdown -c The terminal will notify you and other connected users that the system will shut down at a specific time. If you’d like to wait for ten minutes before the shutdown, you may use the following command: sudo shutdown +10 Schedule Linux shutdown in 10 minutes (command) Here and in all further examples, we’ll use the sudo command to elevate our privileges (become root user during the subsequent command execution). To wait for 60 seconds before the shutdown: sudo shutdown 60 Schedule Linux shutdown in 60 seconds (command) It is straightforward to schedule a planned system shutdown. : You can specify an optional message to all users to notify them about the scheduled shutdown.Ĭheck shutdown man page for additional information about the command.The second way is +m, where m is the number of minutes to wait. The first way is to use hh:mm format, where hh hours and mm are the minutes. time: You may use this argument to specify the exact time to shut down the system. For example, -t 10, will wait for ten seconds. t will instruct the init process to wait for a given number of seconds. : During a shutdown, the init process changes the run-level to 0 to halt the system.For example, you can use -r argument to reboot the system and -c to cancel a pending shutdown. There are many options you can use to satisfy your needs. : You can use several parameters when calling this command.The basic syntax of a shutdown command in Linux is: shutdown time Only the root user can invoke a shutdown command and cancel this operation. When you execute the shutdown command, all the connected users get notified that the system is powering off. Only the root user can shut down the system using the terminal the other users can’t. It is also important to notify other users who may be working on a remote server in some cases. Powering off or rebooting your system using a safe and correct way is still very important, even you’re working in the cloud. Extend your Linux shell skills in just one minute! In this article, we’ll show the most useful examples of planned and instantaneous Linux shutdown or reboot operations. There’re many different ways you can turn off and reboot your local or remote computer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
August 2023
Categories |