init vs. telinit

in Linux+
I've been looking through tons of websites and books, and can't find a single explanation as to the difference between the init and telinit commands.
In fact, one book said that the telinit command was an alias shortcut to the init command. How is typing 3 more letters a "shortcut"????
Can anyone help?
Thanks!
In fact, one book said that the telinit command was an alias shortcut to the init command. How is typing 3 more letters a "shortcut"????
Can anyone help?
Thanks!
Comments
Seemed interesting enough...
http://www.ncsa.uiuc.edu/UserInfo/Resources/Hardware/IBMp690/IBM/usr/share/man/info/en_US/a_doc_lib/cmds/aixcmds5/telinit.htm
in SUSE
telinit is a symlink to init
So they do the same thing.
AND,
if you do a man on telinit you get the init man page....
So don't really know why telinit exists but init will do the same thing on some distros.
Really?
I didn't know that, usually I just do something like this:
init 3
or what ever level I want to change to.
And when you reboot suse (enterprise) it issues:
init 6
since the commands are symlinked together I don't really think it mattes.
Is telinit an older command to be depriciated?
A program can tell what name you're executing it as. Just because its a symlink doesn't mean the two copies will do the same thing. There is a mini utility package called busybox which implements a basic version of several utilities. You only ever get 1 binary called busybox. Everything else is symlinked to that. It knows what you're trying to do because of what the symlink names are.
I guess my confusion is that I can not find a telinit command any where on any of the linux boxes I own or admin professionally. telinit is always a symlink to init.
Now I am sure there are some OS's out there that can tell the different between init and telinit. But on the systems I use/maintain/admin/own when/why would I need to use telinit over init?
I am asking when is it better to use one over the other. Or, to better phrase the question, what does telinit do that init doesn't do (or vice versa).
THanks!!
Any UNIX system can. Most other modern OSes can as well. I'm just pointing out that because its a symlink doesn't mean that both commands will do the same thing. The program can tell the difference.
On a Linux system:
If you run telinit then the init binary will know that you've run it as telinit and therefore run the code to send the new runlevel to the real init.
If you run init then the init binary will know that it isn't PID 1 and therefore will assume that you actually want to do what telinit does. This isn't guaranteed for all UNIX systems.
"init <new runlevel>" will work in your case. There is no guarantee that it will work in every system however. "telinit <new runlevel>" should work in every system.
Also of potential interest:
MCSA 2003, LFCS, LFCE (expired), VCP6-DCV