Tmux - failed to connect to server - Connection refused

I am trying to use Tmux, however i get the error “Failed to connect to server: Connection refused”, when I try any of the following commands

tmux
tmux list-sessions
tmux new-session -s hello -d

If anyone has any thoughts I would appreciate it. Many thanks!

It would help if you could provide some more info about your environment.

  • What OS are you on? (Linux? OS X?)
  • What version of tmux are you running? (Try tmux -V to find out.)
  • Do you have a custom .tmux.conf file and if so, what’s in it?

@matt_paul Did you try using stackoverflow? linux - Why am I getting a "failed to connect to server" message from tmux when I try to list sessions? - Stack Overflow

Maybe it is similar problem with you are having trouble with.