How to run a command on boot in Raspberry Pi

Hi guys,

If you want to run some service/script/command once the raspberry pi starts booting.

You have to edit /etc/rc.local file

Suppose if I want to start motion service after raspberry pi successfully booted.

I will open rc.local file requires sudo

sudo vim /etc/rc.local

service motion start

Now each time raspberry pi boots, it will start the motion service

Comments

Popular posts from this blog

Appending and Prepending in Yocto - +=, =+ vs .=, =.

Linux Commands for Hardware Info - lshw, lspci, lsdev, lscpu, lsblk, lsusb

PR, PN and PV Variable in Yocto