DEV Community

Cover image for Setup tmux on MacOS
Fabien Townsend
Fabien Townsend

Posted on

Setup tmux on MacOS

In a previous post, I discussed how I swiftly set up Fish Shell on my new MacOS.

Now, let's delve into the setup process for tmux.

Why tmux?

Tmux is crucial for maintaining my sanity while navigating between different projects. It allows me to have a distinct session for each project, and within each session, I can manage various windows to perform tasks such as:

  • Running the project
  • Executing tests
  • Opening another related project
  • And more

For installation, ensure that you have brew installed by running:



brew install tmux


Enter fullscreen mode Exit fullscreen mode

To configure the minimal settings and make sure fish is used by default, create a tmux.conf file with the following commands:



$ touch ~/.tmux.conf
$ vim ~/.tmux.conf


Enter fullscreen mode Exit fullscreen mode

Add the following line to the file:



set -g default-shell /opt/homebrew/bin/fish


Enter fullscreen mode Exit fullscreen mode

If you're unsure about the fish path, type whereis fish.

Now, if you want new Terminals to use tmux by default, follow these steps:
Terminal > Settings... > Profiles > Startup

Term2 Configuration

Top comments (0)