Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Tmux on shell login
# If not running interactively, do not do anything
[[ $- != *i* ]] && return
# You can replace 0 with the session name you prefer such as "onLogin" (without parenthesis)
[[ -z "$TMUX" ]] && exec tmux new -A -s 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment