How to stop tmux from launching login shells?

5,327

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

Share:
5,327

Related videos on Youtube

huangzonghao
Author by

huangzonghao

I am a free agent who is focusing on system kernel development

Updated on September 18, 2022

Comments

  • huangzonghao
    huangzonghao over 1 year

    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.