DEV Community

0 seconds of 2 minutes, 9 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
02:09
 
Waylon Walker
Waylon Walker

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

4 1

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.

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay