You are not logged in.

#1 2007-09-09 01:50:27

mivison
Member
Registered: 2007-09-09
Posts: 29

shutdown command?

what is the shutdown command to turn off the computer from the command promt ?

Last edited by mivison (2007-09-09 06:07:32)

Offline

#2 2007-09-09 01:55:00

Warren Watts
Member
Registered: 2007-09-09
Posts: 22

Re: shutdown command?

(as root)

shutdown now

-or-

shutdown -r now    (will restart)


Dual Boot: Arch Linux/Wolvix Cub - 700 MHz AMD Duron - 256MB RAM - 10GB Hard Drive - 8MB AGP
             Ubuntu 7.04 - 450MHz Pentium III - 384MB RAM - 10GB Partition - 32MB AGP

Offline

#3 2007-09-09 01:58:47

mivison
Member
Registered: 2007-09-09
Posts: 29

Re: shutdown command?

thanks

Offline

#4 2007-09-09 02:37:42

rockinchado
Member
Registered: 2007-07-11
Posts: 10

Re: shutdown command?

i find that "poweroff" works a little better because it will stop all of your daemons and do other good shutting down things

Offline

#5 2007-09-09 04:57:46

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: shutdown command?

sudo halt ftw.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#6 2007-09-09 05:00:58

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: shutdown command?

init 0
or
halt -p
big_smile

Offline

#7 2007-09-09 05:19:19

Warren Watts
Member
Registered: 2007-09-09
Posts: 22

Re: shutdown command?

So which method is best/safest?


Dual Boot: Arch Linux/Wolvix Cub - 700 MHz AMD Duron - 256MB RAM - 10GB Hard Drive - 8MB AGP
             Ubuntu 7.04 - 450MHz Pentium III - 384MB RAM - 10GB Partition - 32MB AGP

Offline

#8 2007-09-09 13:20:28

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: shutdown command?

Warren Watts wrote:

So which method is best/safest?

Well, to quote the halt-manpage:

halt manpage wrote:

If halt or reboot is called when the system is not in runlevel 0 or 6, in other words when it's running normally, shutdown will be invoked instead (with the -h or -r flag). For more info see the shutdown(8) manpage.

Thus, if you are using your computer in any normal and sane way, halt just calls shutdown so there is no difference
/sbin/poweroff is a symlink to halt, so there is no difference either.

In other words, there is no better one, all are alike for almost all use-cases.
halt does differ when it is called from runlevels 0 and 6, but you can read how in the manpage


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#9 2007-09-09 15:17:35

mivison
Member
Registered: 2007-09-09
Posts: 29

Re: shutdown command?

thanks again!

Offline

#10 2007-09-11 10:51:40

robertp
Member
From: Warszawa, Poland
Registered: 2007-09-11
Posts: 123

Re: shutdown command?

The recommended method to shutdown, reboot and switch to single user mode is to run shutdown command. It does some fancy things like broadcasting shutdown message to all currently logged users, scheduling real shutdown, enforcing fsck on next boot.

Offline

Board footer

Powered by FluxBB