DEV Community

Play Button Pause Button
Waylon Walker
Waylon Walker

Posted on • Updated on • Originally published at waylonwalker.com

tmux attach

attach is one of the most useful features of tmux. If you have no interest in tmux for pane and window management, you should use tmux for this. It can be a life saver if you ever get disconnected from the host machine or accidently close your terminal you can connect right back into the session you were just in using attach.

attach

tmux attach
Enter fullscreen mode Exit fullscreen mode

this command will simply attach back to tmux if you are ever disconnected

If you ever run long running tasks on a remote machine by sshing into this you should be doing it inside tmux, or something like tmux so that you do not loose your work.

attach to a specific session

If you have multiple sessions running you can select the session that you want to attach to by passing -t .

tmux attach -t scratch
Enter fullscreen mode Exit fullscreen mode

Be sure to check out the full YouTube playlist and subscribe if you like it.

tmux playlist on youtub

Also check out this long form post for more about how I use tmux.

Top comments (0)