A shutdown is a best and secure way to bring a system down. You can shut down a system immediately or you can also set a time delay after which the system will shutdown. This is a secure way as the shutdown command notifies all the processes and users before bringing the system down. And no new user login is allowed after the shutdown is command is initiated.
The other advantage that you get is that only the root user can execute the shutdown command. So to bring down the system only the root user account will be required. This prevents others from accessing and bringing down the system.
So let’s see how you can bring down the system with the shutdown command. As well as how you can set a time delay to shut down the system, for example, a 15-minute time delay to shutdown the system.
Before using the shutdown command let’s see the basics about it.
shutdown options time message
Option: Here it stands for options like halt, power-off, or reboot. So according to what actually you want to do with your system you can choose to put in place of option.
Time: Here time stands for a time delay after which you want to shut down or restart the system. You can also put a specific time at which in a 24-hour format at which the system will restart or shutdown.
Message: Here message stands for a message that is sent to all the users before shutting down.
Now first let’s see what options can we use while using shutdown command.
These are some of the options that you can use while using shutdown command.
Now if you want to delay shutdown by a certain fixed time or even if you want to shutdown the system at a specific time then you can use this.
To use the time delay you can use +m, here m stands for minutes that system should wait. Or the delay after which the system needs to shutdown. This +m needs to be in the place of time in the above shutdown command. If you use the word now or +0 the system will shut down immediately.
The other thing that you can do is specify a specific time at which the system should shut down. You can do this by specifying hh:mm in place of time in the above shutdown command. Here hh stands for hours in 24-hour format( 0 to 23) and mm stands for minutes.
Here messages can be used to inform other users. For example to inform about why the system is being shutdown.
Do you want to change color of terminal to make it look unique here is how to do it.
Now suppose you want to shut down your Linux system or server after 15 minutes. Then here is the example of how to do it.
shutdown +15
This command will shutdown the system after 15 minutes from the execution of this command.
Conclusion:
So guys I hope this article helps you understand how you can use the shutdown command to shut down your system. And if you want to set a time delay then just enter the minute’s number after + sign in shutdown command.
You can utilize a wide range of tools as a Linux user to keep organized, manage your time, and become… Read More
Have you ever caught yourself in a situation where you need details of an audio/ video media file? When you… Read More
If you have installed Linux alongside windows in the dual boot you might have noticed that every time you boot… Read More
Linux kernel is like the core of the operating system. It's a piece of software that works as a middle… Read More
Nowadays, most Linux Distros already have Python preinstalled. But you might have a distribution that might not have Python preinstalled.… Read More
Python is one of the most popular and easy to learn programming languages. Its a widely used high-level programming language… Read More
Just so that you know we use cookies on our website. Want to know more
read here