LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2006, 09:52 PM   #1
edwin11
Member
 
Registered: Dec 2005
Distribution: Linux Mint 13 MATE
Posts: 120

Rep: Reputation: 15
Question What is the Difference Between Reboot and Shutdown?


Just a curious newbie question.

Why is it that when i shutdown, it switches to runlevel 0, but when i reboot, it switches to runlevel 6?

What is the difference between a reboot, and actually shutting down then turning the PC on again?



TIA and Regards,
Edwin
 
Old 01-15-2006, 10:08 PM   #2
NomadX
Member
 
Registered: Jul 2005
Location: Portland, OR
Distribution: Debian Testing
Posts: 78

Rep: Reputation: 15
From the man pages:

#: man reboot

DESCRIPTION
Halt notes that the system is being brought down in the file
/var/log/wtmp, and then either tells the kernel to halt, reboot or
poweroff the system.

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.

The rest of this manpage describes the behaviour in runlevels 0 and 6,
that is when the systems shutdown scripts are being run.


Basicaly, shutdown -h and -r are the 'safe' or 'normal' procedure, reboot is for when the system is for the most part already closed down.

At least that's how I understand it. Since shutdown chages init level before running, it's presumably gonna be more likely leave the entire system in a safe power off state. reboot lets you bypass this behavior if its done in one of the allowed init states.. (runlevels 0 and 6)

Cheers!

Last edited by NomadX; 01-15-2006 at 10:09 PM.
 
Old 01-16-2006, 07:57 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Eh?

Simply stated... "reboot" brings the computer to a complete stop, then boots it up again from scratch without actually turning off the power. "shutdown" does the same thing, then turns off the power.
 
Old 01-16-2006, 10:37 PM   #4
NomadX
Member
 
Registered: Jul 2005
Location: Portland, OR
Distribution: Debian Testing
Posts: 78

Rep: Reputation: 15
Eh?!?

Then why does reboot call shutdown -r when not already in init 0 or 6. Your right about the power states obviously, I just thought there was a hair more to it... No?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help with shutdown and reboot Paxmaster Fedora 2 09-26-2004 04:01 PM
reboot + shutdown :( zulik Slackware 12 05-31-2004 01:36 AM
Difference between Linux and FreeBSD shutdown gkneller *BSD 14 05-20-2004 03:30 PM
Immediate shutdown/reboot Creep Linux - Hardware 4 03-07-2004 04:56 AM
Shutdown nor reboot shusseina Linux - Software 7 05-05-2003 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration