How to use shutdown command with examples

Introduction

“Shutdown” refers to the process of stopping and shutting down a computer or server. This involves cutting the power to the main components of the system using a controlled process. Applications are closed, active processes and protocols are saved to the hard drive, device drivers are removed, and user settings are saved in the process.

There are several options to do so, including scheduling a shutdown at a specific time, shutting down immediately, broadcasting a unique message, and so on.

In this tutorial, We will show you how to use shutdown command in Linux

Syntax of shutdown command

shutdown (option) (time) (message)
  1. options define if you want to halt, power-off, or reboot the instance.
  2. time specifies time value when you want the shutdown to display.
  3. message adds a message that refers to the shutdown.
  • Using the shutdown command without additional arguments will executes the shutdown in 60 seconds.
  • Shut Down the System at a Specific Time
shutdown hh:mm
  1. hh refers to hours
  2. mm refers to minutes

For example:

shutdown 05:00

Use the command above to require a shutdown at 5 AM in the morning

  • To shut down the system in a specific number of minutes
shutdown +m

For example:

shutdown +40
  • To shut Down the System Immediately
shutdown now
  •  To add a message to the shutdown to notify the users what is happened.
shutdown (time) "message"

For example:

shutdown +40 "System maintenance"
  • To Cancel a Scheduled Shutdown
shutdown -c
  • Also to add a message to notify users that the shutdown is canceled
shutdown -c "Canceling System Shutting down"
  • To view all parameters with the info and description for each when shutting down the Linux system.
shutdown --help

Conclusion

That’s all,

In this tutorial, We showed you how to use shutdown command with the examples.

Qadry
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

You might also likeRELATED

How to set PassivePortRange and PassiveIP in pure-ftpd on Ubuntu to secure the app!

Introduction Hi guys, We will talk about setting PassivePortRange and PassiveIP in pure-ftpd. If you run a firewall on your Linux server and want to...

Install Java 8 on CentOS 8

Hi Guys, In this guide, we’ll show you how to install Oracle’s Java 8 programming language on CentOS 8 . It's an object-oriented language...

How to install flameshot on RHEL/CentOS using Snapcraft

In this post, you will learn how to install Flameshot on RHEL / CentOS Flameshot is a powerful open source screenshot and annotation tool for...