DEV Community

Cover image for Setup tmux on MacOS
Fabien Townsend
Fabien Townsend

Posted on

15

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay