Welcome to the most active Linux Forum on the web.
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 02-18-2006, 03:07 AM   #1
Registered: Oct 2005
Location: Bangladesh
Posts: 502

Rep: Reputation: 31
Red face Difference between init and others

Dear Friends ,

Can any one plz tell me what is the difference between

1 ) "init 0" and "poweroff"

2 ) "init 6" and "reboot"
Old 02-18-2006, 05:00 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
When you change runlevel, a number of scripts are run from /etc/init.d (which ones and i which order -- configuration from /etc/rcX.d or similar). They close system services giving them time to do things they need before finishing (writing logs, backup files, state etc). Then the reboot/poweroff is made.

When you just run reboot or poweroff, the services are immediately stopped.
Old 03-04-2006, 05:13 AM   #3
LQ Newbie
Registered: Feb 2006
Posts: 7

Rep: Reputation: 0
There is absolutely no difference .There are 7 run levels in the linux. If you cat /etc/inittab , you will find all the run levels listed there .As mentioned by Mara , there are scripts based on runlevels in /etc/rcX.d, where X will give the run level value .Lets say we wanna put the linux in run level 3 , then rc3.d will be excuted , if you cd in rc3.d you will find various services starting with K and S .K means those services will be killed for this run level and S means they will be started for this run level...Another example , If we cd into rc6.d ( reboot runlevel) , we will see that all the services in the directory are starting with K except Killall and reboot which are starting with S.That means , when the linux is rebooted , all the services are killed .So only killall and reboot are started

Old 03-04-2006, 11:12 AM   #4
Senior Member
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36

Well the difference is that they don't use the same exec as "poweroff" and "reboot" are symbolic link to "halt", but the result is the same i.e. "init 6" do the same as "reboot" and "init 0" the same as "poweroff".


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
Redhat linux9.0:System hangs,if gives init 3 or init 4 Sailaja Reddy Linux - Newbie 4 09-16-2004 03:19 AM
Difference between init.d, xinetd and running service as a dameon jstephens84 Linux - Newbie 1 09-13-2004 06:19 PM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
error: No init found. Try passing the init= option to the Kernel neylitalo Linux - Laptop and Netbook 3 01-22-2004 09:34 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:17 PM.

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
Open Source Consulting | Domain Registration