diff --git a/README.md b/README.md index 335ed08..5de02f0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_856 TILs and counting..._ +_857 TILs and counting..._ --- @@ -722,6 +722,7 @@ _856 TILs and counting..._ - [Adjusting Window Pane Size](tmux/adjusting-window-pane-size.md) - [Break Current Pane Out To Separate Window](tmux/break-current-pane-out-to-separate-window.md) +- [Change Base Directory Of Existing Session](tmux/change-base-directory-of-existing-session.md) - [Create A Named tmux Session](tmux/create-a-named-tmux-session.md) - [Create A New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md) - [Cycle Through Layouts](tmux/cycle-through-layouts.md) diff --git a/tmux/change-base-directory-of-existing-session.md b/tmux/change-base-directory-of-existing-session.md new file mode 100644 index 0000000..cdaf084 --- /dev/null +++ b/tmux/change-base-directory-of-existing-session.md @@ -0,0 +1,17 @@ +# 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: `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)