HowTo: Raspberry start command on startup with tmux

  • Posted on: 27 October 2016
  • By: robin
autostart command as specific user

What you want is to automatically start a script or programm when your raspberry pi boots. And you want so specify a user which is executing the process. Even better, you want to start it in a tmux session because this allows you to attach to the session and see whats going on. You are awesome. But you don't know how to do it ? Simply follow this simple steps:


1. Create a bash script file (e.g. with: touch tmux_start).

2. Add the following lines to this file (e.g. nano

tmux new-session -d -s peter 'python /home/pi/'

This command will create a new tmux session called "peter" and execute the command "python".
Note: I used the total path.

3. Now we set up the autostart. On the raspberry pi one way is to enter a line in /etc/rc.local. Thats want we wanne do. (so: sudo nano /etc/rc.local) copy and paste this:

sudo -u pi bash /home/pi/ &

This command will execute a the bash script as user 'pi'.

tmux, raspberry pi, raspberry, pi, Rpi, autostart


What if I want to run two py scripts?  How would I run 2 scripts in the  Or do I run 2 files each with its own py script?  In either case, how would I make the calls?

 Content composition is very fascinating work who are in this work are truly appreciate the work. You ought to have huge learning about all the common things and subjects. The best essay writing service( ) discloses to us the estimation of this work for the future in light of the fact that numerous authors are getting a charge out of good life.

A special procedure of the cleaning up of the work. You can come to this session and method that how they can improve the clean conditions of the parks of the city. In this place of you can check out for more conditions.