Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.