![]() ![]() You can control the message broadcast to your Linux system when the shutdown command is executed. Please note that you cannot set a message if you shut down the system immediately. If you use “ now” in the time parameter, the system will be powered down immediately. shutdown +0Īlternatively, there is an alias that you can use instead. There are two ways that you can achieve this that we will go over.įirst, you shut down your system immediately by setting the relative time to “ +0“. If you don’t want to wait, the shutdown command allows you to immediately power off your Linux-based system. shutdown +25 Powering off the System Immediately with the shutdown Command We need to use “ shutdown“, followed by the plus ( +) symbol, and finally, the number 25. The shutdown command allows you to set a time relative to the current time by using the “ +” operator.įor this example, let us use this command so that our device will be powered off 25 minutes after you run the command. shutdown 13:37 Example of Using a Relative Time with the Shutdown Command In our case, this means our time will be written as “ 13:37” and not “ 1:37“. ![]() To achieve this, we need to use “ shutdown” followed by the time expressed in the 24-hour format. +m – The time specified for this format is the minutes from the current time you want the shutdown to occur.įor example, to perform the shutdown in 10 minutes, you would use “ +10“.Įxample of Setting a Specific Time to Shutdownįor this example, let us use the Linux shutdown command to power off our device at 1:37pm.The “ mm” part is the minutes of that hour, this needs to be expressed as a two-digit number.įor example, 11:35pm would be written as “ 23:35“. This hour is specified in 24-hour time and is expressed as two digits. hh:mm – The “ hh” part of this format allows you to specify the hour.Let us quickly go over the formats you will be using for the time parameter. This tool allows you to specify this as an absolute time using the format “ hh:mm” or a relative one using the format “ +m“. One of the core features of the shutdown command is its ability to shut down your Linux system at a specified time. Shutdown the System at a Specific Time on Linux Shutdown scheduled for Sat 07:39:49 EDT, use 'shutdown -c' to cancel. This message tells you when a shutdown is scheduled and how you can stop it. shutdownĪfter running the shutdown command, Linux will show a message on the command line. Using the command in this way is great when you only want the device to be shut down and don’t need it to occur immediately. Additionally, Linux will schedule the shutdown for one minute from when you ran the command. When you use this tool without any parameters, it will assume that you want to power off your device. The most basic usage of the shutdown command on Linux is to use it without any parameters. Please note that the parameter is required when setting a message. – The final parameter supported by this tool allows you to choose a message you want to broadcast.Īny users connected to the system will see this message.– Using the time parameter, you can set the time in which the shutdown command will execute.įor example, if you want to shut down the system after 10 minutes have passed, you can use +10.You can use this to change the tool, so it performs a restart or halt instead of powering off your device. – This parameter allows you to control the command’s behavior.Using the optional parameters we can control the behavior of Linux’s shutdown command. When used without any options the default behavior of this tool is to shutdown the device after 1 minute. Halting the System with the shutdown Commandīefore we show you how to use this tool, let us explore the syntax of the shutdown command on Linux.īelow you can see how the command is expressed within Linux, showing all three of its optional parameters.Restart your Linux System using the shutdown Command.Example of Setting a Specific Time to Shutdown.If your user is not the root user, you will need to use “ sudo” in front of the shutdown command. Please note that you will need to have a user that has superuser privileges to use this command. Over the next couple of sections, we will show you how to use the shutdown command in Linux. However, we will go over each of those in their own guide. There are a couple of other commands that perform similar functions, such as poweroff, halt, and reboot. It even allows you to print a message to all users alerting them that a shutdown, restart, or halt will occur. This tool has versatility, allowing you to perform various actions beyond just powering off your device. The shutdown command allows you to safely and cleanly shutdown your Linux system and is the recommended way to do so. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |