1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-02 22:58:01 +00:00
Files
til/tmux/change-base-directory-of-existing-session.md

18 lines
509 B
Markdown

# Change Base Directory Of Existing Session
Each tmux session has a base directory. This is determined when you first
create the session. When you open a new window or pane, this will be used as
the base directory of your new shell session.
You can change the base directory of an existing tmux session.
First, detach from the session: `<prefix>d`
Then, re-attach using the `-c` flag:
```bash
$ tmux attach -t your-session-name -c /new/base/dir
```
[source](https://stackoverflow.com/a/36435535/535590)