Skip to content

UNIX / Linux shutdown Commands

Avatar photo

https://www.linkedin.com/in/gineesh/ https://twitter.com/GiniGangadharan

Shutdown the machine immediately

# shutdown -h now

Reboot the machine immediately

 # shutdown -r now

Shutdown the machine with user defined message

# shutdown -h now 'System is going down for upgrade'

Scheduling the shutdown with 24 hour format

# shutdown -h 20:00
Cancel a running shutdown

You can cancel the running shutdown by using -c option as,

# shutdown -c
 -r Requests that the system be rebooted after it has been brought down
 -h Requests that the system be either halted or powered off after it has been broughtdown, with the choice as to which left up to the system
 -H Requests that the system be halted after it has been brought down
 -P Requests that the system be powered off after it has been brought down
 -c Cancels a running shutdown. TIME is not specified with this option, the firstargument is MESSAGE
 -k Only send out the warning messages and disable logins, do not actually bring thesystem down

See log of system shutdown

# last reboot
 reboot system boot 2.6.18-238.12.1. Sun Jun 5 07:56 (17+00:07)
 reboot system boot 2.6.18-238.9.1.e Sat Apr 30 05:08 (36+02:44)
 reboot system boot 2.6.18-238.9.1.e Fri Apr 22 02:38 (8+02:25)
 reboot system boot 2.6.18-238.5.1.e Sat Mar 5 19:13 (47+06:21)
 reboot system boot 2.6.18-238.1.1.e Sat Jan 22 06:44 (42+12:25)
Solaris

You need to use the shutdown command as follows (you must login as root)

# shutdown -y -g0 -i S

Disclaimer:

The views expressed and the content shared in all published articles on this website are solely those of the respective authors, and they do not necessarily reflect the views of the author’s employer or the techbeatly platform. We strive to ensure the accuracy and validity of the content published on our website. However, we cannot guarantee the absolute correctness or completeness of the information provided. It is the responsibility of the readers and users of this website to verify the accuracy and appropriateness of any information or opinions expressed within the articles. If you come across any content that you believe to be incorrect or invalid, please contact us immediately so that we can address the issue promptly.

Avatar photo


https://www.linkedin.com/in/gineesh/ https://twitter.com/GiniGangadharan
Gineesh Madapparambath is the founder of techbeatly and he is the author of the book - ๐—”๐—ป๐˜€๐—ถ๐—ฏ๐—น๐—ฒ ๐—ณ๐—ผ๐—ฟ ๐—ฅ๐—ฒ๐—ฎ๐—น-๐—Ÿ๐—ถ๐—ณ๐—ฒ ๐—”๐˜‚๐˜๐—ผ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป. He has worked as a Systems Engineer, Automation Specialist, and content author. His primary focus is on Ansible Automation, Containerisation (OpenShift & Kubernetes), and Infrastructure as Code (Terraform). (aka Gini Gangadharan - iamgini.com)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.