1

I use tmux, and everytime i open a terminal it create a new session and don't destroy the old one... I have set the destroy-unattaced to on but at the tmux ls they are still here

Is it possible that when i close the window of the terminal the session is ended ?

Like i only have the session '0' ?

Thanks

0

I can think of three different ways to do that. Try this one first:

Add this to your ~/.bashrc:

if [ ! -z "$TMUX" ]; then
    tmux kill-session -t 0
fi
    tmux new-session -s 0 

Yes, it's too long, but it enables you to improve it.

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.