So, basically, when tmux launches, what all does it run through to start up?

I recently changed the location of my home directory on a few servers, CentOS and Ubuntu. I also use tmux and bash.

I noticed when I launch tmux, it loads a bare bash shell, not running my bashrc, but it does load my tmux.conf. echo $HOME shows my old home directory.

When I'm logged in through SSH, not in tmux, it loads bashrc just fine, and my $HOME is my new home directory.

What does tmux run through when loading, and what would be reading my old home directory for $HOME?

The home directory is changed in the /etc/passwd, I've tried using usermod to write the change that way, it responds with 'no changes'.

Would like to get this worked out. Have already searched around, can't find much. Thanks.

  • 1
    $HOME is typically set by the login program and left unchanged by shells. This seems to be correct for you if you login via ssh. Tmux reads it's config file, and that can specify environment variables and the program(s) to run. So the next step would be to try renaming /etc/tmux.conf and ~/.tmux.conf and see if the problem goes away.
    – icarus
    Oct 5, 2017 at 5:26
  • Moved ~/.tmux.conf elsewhere, still same result. /etc/tmux.conf does not exist. All that tmux installed was the binary in /usr/bin and examples in the /usr/share/doc and documentation in /usr/share/man Oct 5, 2017 at 5:38

1 Answer 1


Add the line:

 set-option update-environment $HOME

to the ~/.tmux.conf file

  • Should that not be just HOME?
    – Kusalananda
    Oct 5, 2017 at 9:38
  • It works with both Oct 5, 2017 at 9:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .