DebugPointer
Published on

Set default shell to zsh in Tmux

Set default shell to zsh in Tmux

Tmux is one of the most useful tool when it comes to using using a linux terminal.

Tmux is a terminal multiplexer, it allows a user to access multiple terminals (or windows), each running a separate program, while providing a single screen to work on. Tmux is useful for running more than one command-line program at the same time, increasing productivity and the way you work.

Setting zsh as default shell for tmux

Setting default shell is easy and can be done using the default-shell command. It's better to set it in the global ~/.tmux.conf.

set -g default-shell /bin/zsh

You have to reload changes in tmux config tmux.conf so that it reflects-

tmux source-file ~/.tmux.conf

You will have to kill your existing tmux sessions to make sure it reflects.

killall tmux

If the above doesn't help, use htop to find all processes named tmux and kill them all using the following command-

kill -9 <processid>

or if you need sudo privileges to kill,

sudo kill -9 <processid>

You can also set the default shell to bash, also check steps to set default shell to fish.

I hope you found this article useful, glad that you found it easy to set default shell to zsh in Tmux. You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.