Is it possible to power on a Linux machine automatically after powercut ? Without me having to press the power button ?

  • 2
    That kind of control is in the BIOS, not in the OS.
    – Tetsujin
    Aug 16 '20 at 17:29
  • You can use a UPS to both shut it down and subsequently start it back up.
    – John
    Aug 16 '20 at 17:40
  • Looks like ups is sort of like a back up battery of sort. It's charged from mains and kicks in to power the computer when there's a powercut. Is this it ?
    – Mark
    Aug 16 '20 at 17:44
  • Seems you talk about a physical linux box, just saying that VMs don't have a BIOS which would provide this functionality but usually can be set up in the VM Management part.
    – Zina
    Aug 16 '20 at 18:58

That's not something you can do using Linux, but rather what the BIOS is for.

In most BIOS versions there will be an option similar to "After power loss" with possible values like Power off and Reboot.

If the BIOS lacks such an option, you might possibly program your router to send a Wake-on-LAN packet on startup, but that depends on many factors.

  • I largely agree. That said, even if the BIOS does not have this functionality, it would still be possible to use something like an Arduino to initiate startup by emulating - or actually pressing - the on button. instructables.com/id/arduino-controlled-pc-power-switch has instructions for 1 such solution
    – davidgo
    Aug 16 '20 at 20:39

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.