• Home
  • Store
  • Blog
  • Contact
  • Home
  • Store
  • Blog
  • Contact
  • #linux
  • |
  • #commandline
  • |
  • #softwareengineering
  • |
  • #embeddedsystems
  • |
  • #compilers
  • ...
  • View All >>

Intro To 'shutdown' Command In Linux

2024-08-30 - By Robert Elder

     I use the 'shutdown' command to shut down my computer:

shutdown

Remotely Shut Down Computer

     I can use the 'shutdown' command to remotely shut down my desktop server.  First, I'll ssh into the remote machine using this command:

ssh my-remote-machine

     Then, I can run this command to start the shut down process:

shutdown

     On my machine, the 'shutdown' command will default to using a timeout value of one minute before the shutdown sequence begins.

     After running the above 'shutdown' command, I'll see output similar to this:

Shutdown scheduled for Fri 2024-08-30 14:00:16 EDT, use 'shutdown -c' to cancel.

Shut Down Immediately

     You can specify the word 'now' to shut down immediately:

shutdown now

Shut Down Message

     You can also provide a shutdown message that will be broadcast to all logged in users:

shutdown now "This is my favourite shutdown message."

     The message that other users see will look something like this:

Broadcast message from root@robert-Inspiron-3521 on pts/0 (Fri 2024-08-30 14:03:16 EDT):

This is my favourite shutdown message.
The system is going down for poweroff at Fri 2024-08-30 14:04:16 EDT!

Reboot Instead Of Shut Down

     The '-r' flag can be used to reboot the machine instead:

shutdown -r now "This is my favourite reboot message."

     And that's why the 'shutdown' command is my favourite Linux command.

A Surprisingly Common Mistake Involving Wildcards & The Find Command
Published 2020-01-21
$1.00 CAD
Terminal Block Mining Simulation Game
A Guide to Recording 660FPS Video On A $6 Raspberry Pi Camera
Published 2019-08-01
The Most Confusing Grep Mistakes I've Ever Made
Published 2020-11-02
Use The 'tail' Command To Monitor Everything
Published 2021-04-08
An Overview of How to Do Everything with Raspberry Pi Cameras
Published 2019-05-28
An Introduction To Data Science On The Linux Command Line
Published 2019-10-16
Using A Piece Of Paper As A Display Terminal - ed Vs. vim
Published 2020-10-05
Join My Mailing List

Privacy Policy
Why Bother Subscribing?
  • Free Software/Engineering Content. I publish all of my educational content publicly for free so everybody can make use of it.  Why bother signing up for a paid 'course', when you can just sign up for this email list?
  • Read about cool new products that I'm building. How do I make money? Glad you asked!  You'll get some emails with examples of things that I sell.  You might even get some business ideas of your own :)
  • People actually like this email list. I know that sounds crazy, because who actually subscribes to email lists these days, right?  Well, some do, and if you end up not liking it, I give you permission to unsubscribe and mark it as spam.
© 2025 Robert Elder Software Inc.
Privacy Policy      Store Policies      Terms of Use