LoginSignup
11
7

More than 5 years have passed since last update.

tmuxのデフォルトシェルをzshにしたいのに起動時にbashなる問題

Last updated at Posted at 2018-09-19

zsh,tmuxインストール、dotfiles設定後、tmuxを起動してもデフォルトシェルがbash等になってしまう場合の対処法。

tmux起動後、$SHELLがzshになっているか確認

echo $SHELL

下記の設定を.tmux.confに書き込む。

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

tmuxを再起動(念のため全プロセスをkillしてから起動)

tmux source-file ~/.tmux.conf

もし上記の設定でも治らない場合は、記述場所を疑う。

例えば.tmux.confの一番下部に記述してみるとか

検証環境

% zsh --version
zsh --version
zsh 5.6 (x86_64-apple-darwin17.7.0)

% tmux -V
tmux -V
tmux 2.3
11
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
7