I have been using these two commands to halt and reboot my system for sometime and i just realized that i was dealing with run levels in Linux.
The commands are:
To halt system
sudo init 0
To reboot system
sudo init 6
I would like to know the different run levels in Linux and some simple explanation of what happens i the different run levels.
Well. The first output line "init [OPTIONS…] {COMMAND} indicates the usage of this command. For now, we don’t have to care about OPTIONS(if you’re interested in it, run man init). Firstly, the command 0 and 6 is your familiar cmd, As you see, init 0 will shutdown the PC, as well as __init 6__will reboot the machine. And the rest, the description is very simple, you should run man init for more detail. That’s all I can tell you, if you’re confused with a new command, try --help for short info, and man it for further understanding.