I want to be able to switch on a computer using Linux Bash. Is there a way?
I know to switch off by use of such command as $(init 0) within a bash script
$(init 0)
I want to be able to switch on a computer using Linux Bash. Is there a way?
I know to switch off by use of such command as $(init 0) within a bash script
$(init 0)
You can use a wake-on-lan tool, passing the MAC address of the machine to start as an argument.
See: Bash one-line command to send wake on LAN magic packet without specific tool
Its doable in Mac (below), but a bit tricky on Linux. Best bet is to enter into the BIOS by hitting "F2" after you have switched your machine on and find the "Auto Power On" command ... but no scripting.
In Mac OS X bash its part of the "sudo systemsetup" command and could be achieved via "-setharddisksleep minutes" and you can even schedule it via crontab -e
, but only as root user. To be honest in Mac its easier to just go to "Energy Saver" and set "Schedule" ... but no scripting.