I've been wondering how a linux pc (e.g. Debian) is restarted.
To an "outsider" a pc seems to be completely shut down just before it is started again; is it so?
I had a look at the source code of reboot command but didn't catch much.
Could someone care to explain?
I assume the BIOS is the one responsible for rebooting the computer, given that BIOS is always on, especially in that second when the computer seems switched off. However, I don't know for sure.
There could be a similar question about any other OS (Windows, macOS and whatnot) but I guess this is not the right forum. Nevertheless, I'd be curious to know whether other OS's handle reboot similarly to Linux.
Edit: My question is specifically about how exactly the transition from shutting down to starting again happens (without pressing a button), which is only (kind of?) mentioned in question How does the system shutdown of a linux kernel work internally? in the following passage of the first answer:
Finally go to rest in some machine-dependent way by calling machine_restart, machine_halt or machine_power_off.
Could someone elaborate at least on that? Thanks.