LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 02-18-2006, 04:07 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Rep: Reputation: 30
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, 06:00 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,568

Rep: Reputation: 164Reputation: 164
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, 06:13 AM   #3
t4tajinder
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

Thanks
Tajinder.Singh
 
Old 03-04-2006, 12:12 PM   #4
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hi,

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".
 
  


Reply


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


All times are GMT -5. The time now is 08:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration