tmux exits with [exited] on mac os x

I just installed tmux (a terminal multiplexer) with homebrew. When I try to run it, it always exits with [exited] Nothing shows up.

When I try to run tmux list-session I get an error:

failed to connect to server: Connection refused

I tried running tmux start-server, but again nothing happens.

What can I do?


I had this same problem. It was caused by having set-option -g default-command "reattach-to-user-namespace -l zsh" in my .tmux.conf without having reattach-to-user-namespace installed.

The fix was to install "reattach-to-user-namespace" via Homebrew (brew install reattach-to-user-namespace)


In my situation I had been fiddling with a number of dotfiles so expected things to be amiss. My fix happened to be shutting down tmux with killall tmux. After this I was able to spin up properly.