📅 2014-Sep-29 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ background, byobu, tmux ⬩ 📚 Archive
When running a training program, that might take hours to complete, I like to run it in the background. However, it should keep running even if I kill my current shell. I should be able to bring it back to the foreground and check its console output and then send it back to background. I should be able to do this any number of times.
The solution that fulfilled these requirements was to run the program in a new Byobu session. This is how I do it:
$ byobu
$ ./my-program
To detach from this Byobu session, just press Ctrl+a
followed by d
.
To re-attach to the Byobu session and check the progress of my program, invoke Byobu again from any terminal or shell.
The advantage of this setup is that Byobu is not the child of my shell, but rather of the desktop lightdm
process. So, it will keep running even if my terminal is hung or killed. It also enables me to see the console output of the program anytime I want.
Tried with: Byobu 5.74, TMux 1.8 and Ubuntu 14.04