In init
based OS /sbin/telinit
is linked to /sbin/init
and in systemed
based OS it's linked to /sbin/systemed
. So, it's a way to communicate with init
or systemed
or similar software.
The result of telinit 6
and reboot
is same, but the they realize a different thought.
Quoting from http://www.tutorialspoint.com/unix_commands/init.htm
A runlevel is a software configuration of the system which allows only a selected group of processes to exist.
So, changing runlevel
is not equivalent to rebooting
or power off
.
In init
based OS runlevel
is permanently mentained by /etc/inittab
. While starting the system init
reads the file to decide which groups of process to start. A runlevel 6 says don't start any process and reboot.
A change in /etc/inittab
is permanent. If the file is modified init
changes the run-level on reboot and sticks to it until further modification of the file.
Effect of telinit
is one time and without reboot. After reboot init
again read from /etc/inittab
and start run-level accordingly.
Now, run-level 6 says init
to kill all child process and reboot. With telinit 6
init
kill all child process and reboot. On, issuing reboot
command, init do the same. But, it doesn't mean changing run-level is equivalent to rebooting. Because if you change the run-level of your system to 6 permanently using /etc/inittab
it'll will keep rebooting.
If you use telinit 6
to reboot your system rather reboot
command it'll not make any difference.