Tmux. Change default start directory
December 14, 2018
if you use tmux you could notice that every time you create new window it starts in the directory where you initiated your Tmux session.
Usually I start my Tmux at home directory but when I work for a project I like to have all my windows to be opened in this particular project.
Sure I can close the session and start the new one from the project directory but… no.
The way you can do it from withing Tmux is press your
<prefix>+: to open the command mode.
attach -c <your-default-start-directory>.
It works outside of Tmux as well. You can run it this way
tmux attach-session -t <you session> -c <your-default-start-directory>.
Feel free to contact me for feedback or questions. Find my contacts on About page.