This type of confusion comes up quite a bit with people that are new to Unix in general and also the whole business of remotely connecting from one Unix system to another, so here's a canonical answer that hopefully will help others in the future as well.
Say this is your scenario:
| Server S | | Client C |
| | | |
| | | |
In the above situation, we have 2 computers, and 2 user accounts. 2 accounts? Yes even though these 2 systems have the same user, user1, these accounts are completely unrelated to each other, other than they happen to have the same name.
If you have software installed on both systems, the software on the 2 systems is completely unrelated from one another. So for example you could have
tmux version 1 on Server S, while Client C could have version 2.
You can check what version a compute has like so:
$ tmux -V
$ irssi -v
irssi 0.8.15 (20100403 1617)
settings & home directories
Most Unix software makes use of setting files, aka. configuration files. These files typically reside in a user's "home" directory, aka.
/home/user1, in our example above.
NOTE: Other users have their own home directories, aka.
So each application will typically keep a default set of settings in your "home" directory in locations such as:
There is no true consistency in how these are named. You'll notice that they contain a period (".") in front of them. This is so that when you do an
ls in the "home" directory these configuration files are omitted from the output.
adir1 adir2 afile1 afile2
$ ls -a
. .. adir1 adir2 afile1 afile2 .irssi .tmux.conf
The first command shows everything minus these period (aka. dot files), while the second version of this command, includes a switch,
-a, which shows these "hidden" files.
settings (fancy word for this is configurations)
So now with some foundation we can better understand your question. Hopefully it's obvious at this point that the configuration settings on one system, are completely independent of settings on another system.
The version of
tmux on Server S could be at say version 1, meanwhile
tmux on Client C could be at version 2, and maybe these 2 versions
have different features and/or capabilities, so the settings files on
these 2 systems would be completely different from one another.
So typically what people will do is maintain the files in a master location, and then copy (or push) them out to the various systems that they use them on. Taking care to maintain any differences between the various versions they may encounter.
This may seem painful but it's actually nice in the sense that it forces you as the user to manage the files in a more thoughtful and controlled way, rather than letting them just float wildly, like a rudder on a sailboat, with no one at the helm.
Also there are tools (scp and/or rsync) to help facilitate the management and/or movement of the files, but that's another topic all together.
which settings are getting used?
So when you
ssh into Server S and start up a
tmux session you're using the
tmux settings from the user1 that's local to Server S. If you disconnect from Server S, and then later connect to it from Client C, you're still using the configuration files from Server S.
Keep this in the back of your mind. The settings that will get used are the ones that are local to where the software is running.
tmux is running locally on Server S, so it will be using the settings local to Server S. The same goes for
ssh connection. You're running the
ssh client, locally on Client C, to connect to Server S, so the
ssh configurations that are being used, are the ones local to Client C.