Back to Blog
Linux shutdown command6/13/2023 ![]() In some cases, it is impossible to reboot or turn off a non-responding, frozen system. The shutdown command can be executed by calling systemctl in the backend to restart or shut down specific systems. If you want to cancel a scheduled shutdown, you can use the -c flag. ![]() If we set a specific interval for the shutdown command, it can be delayed until the system restarts or is turned off. You can also power down a system without waiting by using the -h or -P flags. You can immediately restart a system by pressing the following buttons. To perform most commands, you must be a superuser or sudo. Normally, a computer should respond to any command, but a degraded server may need to be rebooted forcefully. It could be due to a regular maintenance step such as patching or a hardware failure. To put it another way, as a SysAdmin, you reboot or turn off your server frequently. Once the system has shut down, you can then use the “sudo poweroff” command to complete the process. ![]() For example, “sudo shutdown -h -t 60” will shut the system down in 60 seconds. If you want to give a specific time for the system to shut down, you can use the “-t” option. This will tell the system to shut down immediately. ![]() To shutdown a linux server gracefully, the first step is to run the command “sudo shutdown -h now”.
0 Comments
Read More
Leave a Reply. |