10

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?

13

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

| improve this answer | |
2

ps -u foo

then

kill <number1> <number2> ...

or little care with

pkill -KILL <pattern>

This one is not safe when the pattern-name is too short and applied unrelated processes.

man killall

Might help understanding.

| improve this answer | |
1

If your byobu uses GNU screen as backend, use Ctrl+a Ctrl+k to kill current window. See GNU screen manual for more info:https://www.gnu.org/software/screen/manual/screen.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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