Ubuntu – How to kill a byobu session

byobucommand linegnu-screensessiontmux

byobu allows users to create multiple sessions. Once there are multiple sessions, how to kill an entire session?

If there is a session foo with 3 windows and bar with 4 windows, to kill session foo, user have to run CTRL+F6 three times in each window to kill an entire session. Is there a better alternative for it?

Best Answer

You can list byobu current sessions with:

byobu list-session

You should see something like this: session_1: 1 windows (created Tue Feb 6 18:05:35 2018) [237x49] session_2: 1 windows (created Tue Feb 6 18:05:44 2018) [237x49] session_3: 1 windows (created Tue Feb 6 18:06:05 2018) [237x49]

The first word in every line is the session name.

So, to kill a single session you can do:

byobu kill-session -t <session_name>

To kill session_2 in previous list, you can do:

byobu kill-session -t session_2

Related Question