How to kill a byobu session?
Solution 1
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
Solution 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.
Solution 3
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
Related videos on Youtube
Pandikunta Anand Reddy
Day Dreamer. AvilPage - Personal/Tech blog.
Updated on September 18, 2022Comments
-
Pandikunta Anand Reddy almost 2 years
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 andbar
with 4 windows, to kill sessionfoo
, user have to runCTRL+F6
three times in each window to kill an entire session. Is there a better alternative for it?