I know very little about Raspberry Pi and Python. I've been able to turn off the LEDs in the terminal using the following command:

sudo su -
echo none > /sys/class/leds/led0/trigger

However, I would like to incorporate that into a Python program that can be executed on start-up. How can I approach this?


I found a work around that simply allows me to add a few lines to the boot config file /boot/config.txt

To disable ACT LED, add


To disable PWR LED, add

  • Please note that each of those lines is actually two lines Mar 8 '19 at 23:52
  • That may be a workaround but it's not a valid answer to your original question
    – Dougie
    Mar 9 '19 at 0:27

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.