In Linux, pretty much everything is a file: A file is a file, a directory is a file, and devices are files, too. These files are not always readable and writeable, but you can try to use some standard file operations on them. For the LEDs, writing 0 or 1 to certain files in /sys/class/leds/... makes the LEDs go on and off:

Assuming you have an ssh connection to your beaglebone, switch to a "root" session by typing:

sudo -s


You should now see something like "root\@bbb-bob" in the terminal. Be careful in root sessions - the root user has full adminstration rights, and Ubuntu won't ask you safety questions like "Are you sure you want to mess up your system?".

## Switch off the first of the four system LEDS

Note: On some newer distributions, these LEDs were renamed slightly. Go into the folder "/sys/class/leds/" and poke around a bit. Mine is now called "/sys/class/leds/beaglebone:green:heartbeat".

By default, the first LED blinks in a heartbeat pattern, which can be quite annoying. Let's switch that off.

Go to the folder of the LED. On an older distribution, it is:

cd /sys/class/leds/beaglebone\:green\:usr0/


On a newer distribution, the path is

cd /sys/class/leds/beaglebone:green:heartbeat/


The blinking is triggered by whatever is set in the file "trigger". Let's have a look at that file. The command "cat" gives us the content of the file "trigger" on the standard output:

cat trigger


For me, the file looks something like

none rc-feedback mmc0 mmc1 timer oneshot [heartbeat]
backlight gpio cpu0 default-on


The brackets [ ] indicate that it is currently set to "hearbeat". We'll disable the heartbeat pattern by setting the trigger to "none":

echo none > trigger


The command "echo none" means: Repeat the string "none" to the standard output. The ">" redirects the standard output to whatever stands on the right side of ">". You can think of the ">" command as an arrow that points the output of one command to the input of another. The "command" on the right is a file-name, so the "none" is simply written to that file.
The file is, of course, not an actual text file, but a special interface file that tells the BeagleBone to set the trigger of the LED off.

Now you can manually set the LED on and off:

Assuming you are on an older distribution, do:

echo 0 > brightness
echo 1 > brightness


## Disable the "blinking" of the LEDs on boot

There are many different ways to do stuff every time the computer starts. I put the command that disables the blinking of the LEDs into the rc.local file by callling the command

sudo nano /etc/rc.local


and inserting the following lines between all the comments and the "exit 0" line:

# Disable the blinking of the LEDs, for older distributions
echo none > /sys/class/leds/beaglebone\:green\:usr0/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr1/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr2/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr3/trigger


# Disable the blinking of the LEDs, for newer distributions
echo none > /sys/class/leds/beaglebone\:green\:heartbeat/trigger
echo none > /sys/class/leds/beaglebone\:green\:mmc0/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr2/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr3/trigger


Now, when I reboot my BeagleBone using

sudo reboot


the lights flash for 10 seconds while the BeagleBone finishes booting, but then go dark as soon as booting is finished.