Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want when the computer start, a byobu session is started and a command executed in the first window (windows 0), without requiring any user intervention.

It is very important that this doesn't require an actual user to login.

How to do that?

I suppose this byobu will be accessible later to user root (or if possible another user ?)

share|improve this question

If you want a command to be executed at boot time, you can put it in your crontab with @crontab instead of a time. So run crontab and add a line like

@reboot byobu -S boot-time mycommand

Instead of putting the command on the command line of byobu, you can put it in a Byobu session file.

If you want the session to be executed as root, you can start it from /etc/rc.local instead of root's crontab. Be sure to start it in the background, since the boot isn't complete until /etc/rc.local has finished running.

byobu -S boot-time mycommand &
share|improve this answer

Now byobu is based on tmux, the easiest way is to directly use tmux.

in my case I use the following syntax:

tmux new -d -s session-name /path/to/my/Script.sh

and connect to it I use:

tmux session has -t-name

in your crontab you will have to enter:

@reboot tmux new -d -s session-name /path/to/my/Script.sh
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.