sudo shutdown -now If it doesn't work. Pull the plug (it could damage your SD card but desperate times call for desperate measures)