Search code examples
raspberry-piraspberry-pi3

Raspberry pi shut down when used headless


I have made my raspberry pi run a certain program at boot up. There is no mouse or keyboard connected to the pi so how can I shut down the raspberry pi without keyboard or mouse.


Solution

  • There are a few ways to shut down a Raspberry Pi without keyboard and mouse. Most require connection to Wi-Fi. Here are a few...

    1. You can connect a button via the GPIO pins and add a program that waits for the button to be pressed and then issues a shutdown command.
    2. You can enable SSH on the Raspberry Pi and log in remotely to issue a shutdown command. (https://www.raspberrypi.org/documentation/remote-access/ssh/)
    3. You can sign up to VNC and enable it on your Raspberry Pi. This allows you to connect remotely to the desktop GUI and shut down normally. (https://www.raspberrypi.org/documentation/remote-access/vnc/)