Shut Down Raspberry Pi Hardware

Your Raspberry Pi™ hardware is a mini-Linux® computer. Disconnecting the power cable without properly shutting down can corrupt the SD card and cause Linux boot failures. To avoid this problem, shut down your Raspberry Pi hardware using Linux commands. Using the MATLAB® Command Window, enter:

h = raspberrypi
h.execute('sudo shutdown -h now')

When the Raspberry Pi shuts down, all LEDs except for the PWR LED turn off. Power recycle your Raspberry Pi hardware when you want to boot into Linux kernel again.

To reboot your Raspberry Pi hardware, execute the following command:

h.execute('sudo shutdown -r now')
Was this topic helpful?