Welcome back, dear readers! As a terminal enthusiast, I often find myself playing around with different shells to find the one that suits me the most. Recently, I’ve fallen in love with zsh, and I wanted to set it as my default shell in Tmux. In this blog post, I’ll share with you the simple steps to make zsh your default shell in Tmux. So, sit back, grab a cup of coffee, and let’s dive into the world of Tmux and zsh!
If Tmux is new territory for you, the basics of Tmux is your roadmap. For the Tmux experts, let’s hit the fast-forward button!
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. There you go, folks! We’ve successfully navigated the path to setting zsh as our default shell in Tmux. Not too complex, right? I’m confident that, like me, you’ll find the zsh experience in Tmux to be a delightful one. Remember, it’s all about making the terminal your own personalized space, so don’t be afraid to experiment. As always, I’ll be back with more such nifty terminal tricks, so stay tuned!
You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.