Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-28-2010, 02:52 AM   #1
LQ Newbie
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
Talking Difference between init 0 and shutdown -h now

Hi everyone,

could anyone enlighten me to see if there are differences between init 0 and shutdown -h now?

Thank you!
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-28-2010, 05:26 AM   #2
LQ Newbie
Registered: Dec 2008
Distribution: redhat
Posts: 27

Rep: Reputation: 17
Dear cheng0017,
shutdown arranges for the system to be brought down in a safe way. All
logged-in users are notified that the system is going down and

init is the parent of all processes on the system, it is executed by the kernel and is responsible for starting all other processes;it is the parent of all processes whose natural parents have died and it is responsible for reaping those when they die.Processes managed by init are known as jobs, and can be further split into two types; services are supervised and respawned if they should terminate unexpectedly, and tasks are simply run once and not respawned if they should terminate.

Basically init 0 change the current run level to run level 0.
shutdown -h can run by any user but init 0 can only run by superuser.
[joy@localhost ~]$ init 0
init: Need to be root
[joy@localhost ~]$
Old 03-28-2010, 06:35 AM   #3
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 831

Rep: Reputation: 43
To expand:

From the man page
shutdown does its job by sig-
nalling the init process, asking it to change the runlevel. Runlevel 0 is used
to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is
used to put to system into a state where administrative tasks can be performed
Essentially the end result is the same but shutdown allows useful options which on a multiuser system creates less enemies :-)
2 members found this post helpful.
Old 03-28-2010, 02:38 PM   #4
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
As far as I know, shutdown command could be run only by root user.

When we run shutdown command it inturn calls the init process to do the job.
Shutdown provides us with more options, for eg.: If your system's name is ServerA, then suppose 3 users are logged in to ServerA remotely via ssh.
Now, you (root) wish to switch off the system, you issue "shutdown -h now" , now all the 3 remote users will be displayed in their working terminal with the message that ServerA is going to shutdown immediately.

Note: I have noticed that in RHEL5, by default, even an ordinary user can execute the command "poweroff" without any problem...? why is it so???

Last edited by saagar; 03-28-2010 at 02:49 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
difference between /etc/init.d and /etc/rc.d/init.d dawn Linux - Newbie 2 10-28-2008 01:02 PM
Difference between /etc/init.d and /etc/rc.d/init.d barkout Linux - Newbie 2 04-02-2007 03:56 PM
init.d difference? yogaboy Linux - General 3 12-18-2006 12:36 PM
difference between /etc/init.d/rc#.d and /etc/rc.d/ zhimsel Linux - General 5 10-26-2006 05:47 PM
Difference between init and others shipon_97 Linux - Newbie 3 03-04-2006 12:12 PM > Forums > Linux Forums > Linux - Newbie

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

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