Created
April 13, 2020 15:16
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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