How to stop tmux from launching login shells?

TMUX defaults to launching shells as login shells. I am looking for a way to negate this behavior (so that it will launch non-login shells) in .tmux.conf file.

Currently I can use tmux set-option -g default-command "/bin/bash" from outside of tmux. But this can only be done when the tmux has already been launched and I can't seem to find a way to integrate it into the conf file.


You need to modify your .tmux.conf like this:

To disable this behaviour, add to ~/.tmux.conf:

set -g default-command "${SHELL}"

From: https://wiki.archlinux.org/index.php/tmux#Start_a_non-login_shell