I've been looking on the Internet for an answer and haven't found a concrete one. If I want to change the runlevel it is okay to use just init or do I always have to call it through telinit.

I've read that telinit is in fact a symlink to init. If this is correct, can I use them interchangeably?


The manual page telinit(8) answers your question: use telinit.

telinit may be used to change the system runlevel.

| improve this answer | |

It should be fine to change the runlevel with either one. As init is supposed to check if it is the real init process. Or just a telinit, by checking if it's pid is one, not by the name of the file.

So yes, you should be able to use them interchangeably.

However, I cannot guarantee there are no non-conforming systems, where this will not work out. It is best to check yourself if it works as intended on your install.

| improve this answer | |

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.