Fork me on GitHub
31 Oct 2013

Automatically Starting tmux on SSH

It’s always a good idea to use screen or tmux when doing any significant amount of over SSH in case your connection gets dropped. If you do this frequently, you might want to have screen or tmux start automatically so you don’t forget. To do this, append the following to your ssh command, or if you’re using Chrome’s Secure Shell extension, add the following to the “SSH Arguments” field:

-t -- screen -R


-t -- /bin/sh -c 'tmux has-session && exec tmux attach || exec tmux'


← Previous
Next →