DebugPointer
Published on

Detach to a Tmux session

Detach to a Tmux session

Tmux is one of the most useful tool when it comes to using using a linux terminal.

Tmux is a terminal multiplexer, it allows a user to access multiple terminals (or windows), each running a separate program, while providing a single screen to work on. Tmux is useful for running more than one command-line program at the same time, increasing productivity and the way you work.

Let's say you have already created one or more tmux sessions, and you want to exit from it. So, basically you are inside your tmux session. We will discuss how you can detach or disconnect or exit from a tmux session.

Detach from a Tmux Session

Let's consider the case where you will have created multiple sessions.

Ctrl-B + d

In case you have to attach back to the session you can do it with the tmux attach command. You can also list tmux sessions to see the active tmux sessions that exists.

There are several other ways to exit from tmux in case you are considering killing sessions or even a nested tmux session.

I hope you found this article useful, glad that you found it easy to detach from a session in Tmux. You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.