To enter a session:
byobu attach -t "session name"
Open a tab in the current session:
byobu new-window "bash"
Open a tab in a new session (if session doesn't exist):
byobu new-session -d -s "session name" "bash"
But how to open a new-window in an existing session by calling its name?
I had the same problem and found the solution by using the
-t "session name"param when creating new byobu windows.Example of my script that also restarts several processes and thus must first kill all the previous processes (in the previous session). The first process starts a new (detached
-d) session with a specific$SESSION_NAMEname, later processes only start a new window attaching to the$SESSION_NAMEsession. I also name my windows, that's what the-nparam is for: