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 03-22-2007, 04:48 AM   #1
binary_0011
Member
 
Registered: Apr 2006
Location: Singapore
Distribution: RHEL4,FC4,FC5
Posts: 89

Rep: Reputation: 15
telinit vs init


can someone tell me what is the different between init and telinit?

Thanks.
 
Old 03-22-2007, 05:27 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
init is the primary process that is the parent to all other processes. It starts at boot and checks out your /etc/inittab and a bunch of other settings. It also has the notion of the runlevel and knows, from your /etc/init.d settings for instance, which processes to start/stop when you switch between runlevels.

telinit is a smaller tool that informs init when it needs to switch runlevels. So you can use "telinit" to "tell init" that it needs to switch runlevel.

A quick example:
when you boot into graphical mode (runlevel 5), init will start and launch all programs associated for runlevel 5 (itself being the parent process of all those). When you then ask to shutdown the machine, telinit will inform the -still running- init process that it needs to switch to runlevel 6 (for reboot) or 0 (for system halt).

See "man init" for details on runlevels.

Last edited by timmeke; 03-22-2007 at 05:30 AM.
 
Old 03-22-2007, 11:03 AM   #3
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 48
From the user's point of view there is (afaik) no difference. telinit 5 and init 5 executed from the commandline will produce identical results.
 
Old 03-22-2007, 10:04 PM   #4
binary_0011
Member
 
Registered: Apr 2006
Location: Singapore
Distribution: RHEL4,FC4,FC5
Posts: 89

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by alienDog
From the user's point of view there is (afaik) no difference. telinit 5 and init 5 executed from the commandline will produce identical results.


er...i see.....
 
Old 03-17-2014, 10:35 AM   #5
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Rep: Reputation: Disabled
Quote:
Originally Posted by binary_0011 View Post
er...i see.....
yeah, I wondered the same thing when i just recently dived into Slackware

I guess what timmeke and alienDog are trying to say is that telinit is a cleaner and neater solution. Running more than one init process is not nescessary and may confuse things in a ps analysis. But nevertheless, both have the same effect and you can use init is you want.

I still prefer the init system in FreeBSD over sysv or any other Linux init system for that matter. But Linux still has many advantages over FreeBSD for desktop computing. And Slackware feels the most like FreeBSD so far. Which is maybe why I'm starting to like it at the moment.
 
Old 03-17-2014, 10:39 AM   #6
ethoms
Member
 
Registered: Nov 2011
Posts: 113

Rep: Reputation: Disabled
Oops, I didn't realize how old this thread was... LOL.

binary_0011: I live in Sinagpore too. At least here in 2014. Do you still live here, go to any LUG here? I find it very rare in Singapore to find someone who speaks Linux.
 
Old 04-16-2014, 04:19 AM   #7
gopi219
LQ Newbie
 
Registered: Oct 2006
Posts: 9

Rep: Reputation: 0
Lightbulb INIT

init is the parent process to all other process. But telinit will use init; either you have link or not - telinit has to use init. If you don't see telnet have link to init do strings command as below to understand.

# strings `which telinit` | grep init
nih_main_init_full
dbus_error_init
dbus_message_iter_init_append
dbus_message_iter_init
__libc_csu_init
telinit.c
RUNLEVEL may also be Q or q to instruct the init daemon to reload its configuration, this is rarely necessary since the daemon watches its configuration for changes.
RUNLEVEL may be U or u to instruct the init daemon to re-execute itself, this is not recommended since Upstart does not currently preserve its state.
 
  


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
telinit 3 cant go into sixarett Linux - Hardware 2 09-01-2005 05:31 PM
telinit 3 undef00 Linux - Hardware 3 08-13-2005 02:44 PM
init 3 or telinit 3 dosnt exit xorg noteventime Linux - Software 6 03-13-2005 06:01 PM
Can't telinit 5 kalis_dc Linux - Newbie 3 10-30-2003 08:42 PM
telinit newbie45 Linux - Hardware 2 09-17-2003 08:24 AM

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

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

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