This article will show you different ways to shut down the Linux system safely.
How to Shut Down Your Linux System
There are different Linux commands you can use to shut down the Linux system, which are as follows:
Command 1: Shutdown Linux System Through “shutdown” Command
The “shutdown” command is one of the most widely used commands in Linux systems that can safely shutdown the system.
The fundamental syntax to use this command is given below:
If you apply the above command directly, it will schedule the shutdown time and within 1 minute, it will automatically shut down the Linux system.
You can cancel the shutdown anytime using the following command:
If you want to immediately shut down your Linux system without waiting, you can use the following command:
You can also set the timer for the shutdown as well using the following syntax:
If you want to shut down the Linux system after 5 minutes, you can run the following command:
In case if you want to schedule a time for a specific hour, you can schedule the time accordingly. Like in my case, I want to shut down the system at 8 pm. For this reason, the command will look like the following:
If your Linux system is accessed by multiple users simultaneously, it’s better to broadcast a message to notify them about the shutdown time. You can do this on a Linux system using the following command:
Command 2: Shutdown Linux System Through “halt” Command
You can also use the “halt” command to shut down the system. If you directly apply the “halt” command, it will instruct the hardware to stop the CPU function.
However, if you want to shut down the system immediately, you can apply the following command:
Command 3: Shutdown Linux System Through “poweroff” Command
The “poweroff” command can also be used to shut down the system as it sends the signal to power down the system processor. The “poweroff” command immediately shuts down the system as soon as you execute the command in the terminal:
Conclusion
Linux users can easily shut down the system from the terminal using the “shutdown” command, which can be used in different ways already discussed in the above guidelines. The users can also apply the “halt” command to stop the CPU functionality and shut down the system. Further, the “poweroff” command can also be used to shut down the Linux system immediately.
from https://ift.tt/hrQtwx9
0 Comments