How to change the starting directory of a tmux session?

后端 未结 3 1004
失恋的感觉
失恋的感觉 2021-02-05 01:03

The directory where you start a tmux session in will be the directory that all new windows will start at.

My question is, how can you change this starting directory wit

3条回答
  •  孤街浪徒
    2021-02-05 01:56

    Chucksmash's answer is a good one, but it can also be achieved without using the session if you like. The command attach-session is also available in the tmux command prompt; and the target session can be specified as the "current" session using a dot.

    attach-session -t . -c /path/to/new/directory
    

提交回复
热议问题