Skip to content

Instantly share code, notes, and snippets.

@carlessanagustin
Created April 13, 2021 09:14
Show Gist options
  • Save carlessanagustin/fa735dd5e9fece8f19a8ff2bbca7ac8f to your computer and use it in GitHub Desktop.
Save carlessanagustin/fa735dd5e9fece8f19a8ff2bbca7ac8f to your computer and use it in GitHub Desktop.
Autostart tmux session when logging in via SSH
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