Created
April 13, 2021 09:14
-
-
Save carlessanagustin/fa735dd5e9fece8f19a8ff2bbca7ac8f to your computer and use it in GitHub Desktop.
Autostart tmux session when logging in via SSH
This file contains hidden or 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
cat << 'EOF' > ~/.bash_profile | |
if [ -z "$TMUX" ]; then | |
tmux attach -t default || tmux new -s default | |
fi | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment