Hello there! If you’re reading this, you’re probably as big of a fan of the fish shell as I am. You’re also probably a Tmux user, looking to combine the power of these two fantastic tools. Well, my friend, you’ve come to the right place. In this blog post, I’ll be sharing with you how to set your default shell to fish within Tmux, allowing you to enjoy the user-friendly and powerful features of fish while taking advantage of the multiplexing capabilities of Tmux. So let’s dive in!
Just starting out with Tmux? Don’t miss out on the Tmux basics. Seasoned with Tmux? Let’s take the plunge!
Setting fish 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/fish
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 zsh, also check steps to set default shell to bash.
I hope you found this article useful, glad that you found it easy to set default shell to bash in Tmux. And there we are! You’ve now set fish as your default shell in Tmux. You can now enjoy the rich features of fish while juggling multiple terminal sessions effortlessly with Tmux. I hope this guide has been beneficial to you. Remember, the more you explore these tools, the more proficient you’ll become. Keep on swimming in the sea of coding, and stay tuned for more tips and tricks!”
You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.