Skip to content

Instantly share code, notes, and snippets.

@imneonizer
Created April 13, 2020 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imneonizer/04022ebecf6cdd6b13b6685df7436b2c to your computer and use it in GitHub Desktop.
Save imneonizer/04022ebecf6cdd6b13b6685df7436b2c to your computer and use it in GitHub Desktop.
add this file to ~/.bashrc and when ever you will do a ssh connection / open terminal, a tmux session will automatically created/attached
if (`tmux attach -t backup`) ; then
echo "tmux attach -t backup"
else
echo "tmux new -s backup"
`tmux new -s backup`
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment