Skip to content

The shutdown and reboot commands: a downloader’s boon(and of course sudo too)

December 19, 2009

So now on to switching off your computer using the command line. Note that all these require sudo privilege to work.

The commands are pretty self-explainatory but their options are what really is the power of these commands. Of course, shutdown is the best and poweroff, halt and reboot simply call the shutdown command with the exceptions with the use of a few options.

So first the easy ones poweroff, reboot and halt. These can just be used as

Often, when needed to shutdown or reboot instantly using the command line, poweroff and reboot are more useful than manipulating the options of shutdown.

Now the most useful part of shutdown is that you can program the computer should shutdown. This is really useful for all you nightbirds with unlimited like me. I start downloading at 2:15 am and just leave the computer with a shell that’s running the shutdown command take care of shutting down when it’s time: no hassles at all!

The poweroff, halt and reboot can be implemented using shutdown command as
shutdown -h now,
shutdown -h now,
and shutdown -r

The coolest part is that you can automate the time when your computer should switch off using shutdown command.

For example,
shutdown -h 07:45
shutdown -h 20:30
would switch off the computer at 07:45am and 8:30pm respectively.

So that’s how you can shutdown the computer, reboot it and also automate the shutdown. Pretty neat huh? And quite easy too!

sudo command
Since I’ve talked about sudo command, thought I’d write about it as well(there’s nothing much).

sudo stands for Substitute User DO. Basically, the command let’s you execute commands as the all-powerful superuser. Do read about this unique security feature that was partially copied in Vista if you don’t know already.

To execute a command as superuser,

Till next time, ciao!

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: