Linux Shutdown command.
Hello reader, Linux shutdown command widely used by Linux admin or Linux users during various operations. Many times we face issue in Linux infrastructure and system were need to shutdown or need to be restart immediately. As a Linux users. you make ensure if Linux machine used for application or any other purpose, you should communicate to application owner about shutdown and restart with proper time and date. Many times the shutdown and restart would be take care in weekend or off business hours. So how to do the shutdown and restart of Linux machine. Answer is below. before shutdown or restart the make ensure application process and fully stopped ( DB instance, MQ or any traversal or application process would be fully stopped in conditions)
Command Template :
shutdown [options] [time] [wall]
1. Command for – Shutdown your PC immediately
Vicky@pwr-VirtualBox:$ shutdown now
2. Shut down your PC at a dedicated time
Vicky@pwr-VirtualBox:$ shutdown hh:mm
3. Shut down after a few minutes or hours
Vicky@pwr-VirtualBox:$ shutdown hh:mm
4. Show a message to the people who are logged in your
Vicky@pwr-VirtualBox:$ Shutdown +m “Please save your Work, the PC will Shutdown in 5 Minutes”
5. Restart Your system using shutdown command
Vicky@pwr-VirtualBox:$ shutdown –r
Vicky@pwr-VirtualBox:$ shutdown –r +m
6. Powering off Command
Vicky@pwr-VirtualBox:shutdown –p
7. Halt the machine after terminating processes
Vicky@pwr-VirtualBox:shutdown –h
if you interested in another Linux article. You can read this amazing article as well.
How to find top 5 largest files in directories on Linux/Unix
You can watch below videos for more information.
Shutdown Command for Linux Machine – UBUNTU and CENTOS