With identical settings, and a safety check command, firing shortcuts to create new panes in Tmux on WSL only get me new panes started at home dir. Settings as well demonstrations go as below: enter image description here

Clarification: I am sourcing the same _tmux_settings script on another Linux machine, and panes are splitting nicely: right at where they should have been, the "pwd" of where I am firing it.

  • My Windows OS is: 17134.376

  • My WSL verion is: Linux LL-PC 4.4.0-17134-Microsoft #345-Microsoft Wed Sep 19 17:47:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux


How may I start new panes at current working directory, instead of being sent back to home directory? It is confusing as the return value from tmux display ... command does show that #{pane_current_path} is evaluated correctly.


  • This Github Issue for WSL Mentioned that things should go well if tmux display -p '#{pane_current_path}' is working, then new panes should strat normally.
  • This Github issue for Tmux seems more relevant, but it is unclear what to do when tmux display is showing paths as they should have been.
| improve this question | | | | |
  • Thank you for the ref. As tested $PWD also does not help. (I have tried to set it up in ~/.tmux.conf, and new panes are still all created at home directory.) – llinfeng Oct 29 '18 at 19:38

I solved this issue! In my case it was caused by a cd ~ in my .bashrc.

| improve this answer | | | | |
  • I asked the original question, and this was exactly the case ==> took me quite a good number of months to figure this "feature/bug". Abandoning my original answer and selecting this post as the shorter solution. (PS: @someone who downvoted, please rever it. Thx.) – llinfeng Mar 19 '19 at 4:12

User's own fault

I have to confess that tmux has been doing its job exactly as prescribed. It was a line of four characters (cd ~) that brought up the alleged trouble. I would like to endorse the great answer above :)

What had happened could be explained as the following:

  • My original tmux settings had a line of cd ~ somewhere in ~/.tmux.conf;
  • Per the new installation, I wiped out the entire partition on the hard drive, and thus got rid of the cd ~ setting.
  • This is where (-1)*(-1) = +1 ==> two user mistakes that fixed the trouble :) [@Native English speaker, please comment the proper expression. Thx!]


I keep the original "answer" as below. Nothing was added or deleted. Keeping everything together in case someone runs into the same cd ~ trouble again. (Also, dear the administrator, please do not delete this post. I have spent hours trying to fix such trouble, and I do not want other people to suffer from the loss of such hours in their lives.)

An answer that is not a real answer

Well, after the following two concrete steps, the symptom I reported vanished.

  • Reinstall the Windows 10 OS, and
  • Reinstall the WSL system

By the way, I have also replaced the entire set of hardware :) In particular, I did not change anything in my ~/.tmux.conf, nor any WSL configuration files. (For WSL specifically, I did not touch anything in /etc/wsl.conf.)

Specs and screenshot (problem fixed)

Here goes the current versions of Windows & WSL, with another screenshot showing that the original problem has been resolved.

  • Windows OS Build: 17134.376.
  • WSL version: Linux PC 4.4.0-17134-Microsoft #345-Microsoft Wed Sep 19 17:47:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux

enter image description here

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.