A Quick Look At The Shutdown Command

This is going to be just a quick article about a command many of you will be familiar with, as we take a quick look at the shutdown command. This is pretty basic and something everyone should be familiar with.

Our pure-GUI users will just shut the computer down with the menu option but sometimes a GUI is unresponsive. There are other times when you don’t have GUI access, as there’s no desktop environment loaded. When this happens, you can still shut the computer down. To do this, you can use the shutdown command.

There’s not a lot to the shutdown command, but the good news is that you won’t have to install anything to use it. If you’ve got a Linux system, you’ve got access to the shutdown command.

In fact…

shutdown:

As I said, you won’t need to install anything to use the shutdown command. It’s something that’s built in. You can check the man page with the following terminal prompt:

If you run that command, you’ll see that this is the correct tool for the job. It will in fact shut down the computer, though it has a few options that we’ll cover. We won’t cover everything,  just the things you’re likely to need.

The man page describes the command like so:

shutdown – Halt, power-off or reboot the machine

See? If you want to shut the computer down (including halt and reboot) then this is the correct command for the job.

The Shutdown Command:

As mentioned above, this is a terminal-based command. That means you’re going to need an open terminal. If you press CTRL + ALT + T a terminal should pop up. If not, there’s a terminal in your application menu.

Some systems may require ‘sudo‘ for this. This is not true for all distros and you’ll need to discover that on your own. I’ll omit the sudo in this article.

The basic syntax is this:

That command will stop anyone from logging in and shut the computer down in five minutes. It’s the basic usage of the shutdown command.

If you want to shut down the computer immediately, try this command:

If you want to reboot, try this command:

Again, that will reboot the computer in five minutes and stop anyone from logging into the system. 

If you want to reboot immediately, add ‘now’ to the command like so:

You can also halt the system. If you halt the system, it will remain powered on but all CPU functions will cease immediately. That works just like the above commands. To halt the system in five minutes run this command:

If you want to halt the system immediately, run this command:

You’ll need to power the system down and back on with the power button.

You can also schedule a shutdown, reboot, or halt. To do that, you use the HH:MM (hours/minutes in 24-hour time), like so:

If you schedule a shutdown, nobody will be able to log in within five minutes of the scheduled shutdown command. You’ll remain logged in and people can log in until that time is reached, but after that time is reached no new users can log into the system.

There is more to the shutdown command but that’s all you’ll realistically need, even as a system administrator. And, if you don’t know this already, you’re a system administrator even if you’re just a basic Linux desktop user. You’re in control of your computer.

Closure:

I thought I’d cover the shutdown command because it’s something I haven’t covered yet. I started off trying to cover the basics first, but I didn’t cover everything. There are still basic functions that I’ve yet to cover. I’ll get to them eventually.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe to Newsletter!
Get notified when new articles are published!
We promise to never share your email!
icon

Author: KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Leave a Reply

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

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.