I am using the new Windows 10 terminal with the WSL ubuntu and zsh (oh-my-zsh) shell as the standard terminal inside. It is configured that the context menu (right-click) has the option "open terminal here". It will open the new terminal with the Ubuntu and zsh shell in the directory I called it from. It works perfectly but now when I open the terminal via the start menu the start directory is /mnt/c/Windows/System32
.
I want that on start-up of the terminal the directory changes to the home directory if it would start in /mnt/c/Windows/System32
.
How can I do that? How do I know in which directory zsh will start?
pwd
returns /mnt/c/WIndows/System32, and if so, then itcd
s into ~. Perhaps theres a way to do this in the zsh configuration file like you can do for .bashrc, for example. I only use Bash for now so I'm unsure how to implement it straight up - but this should get you on the right track.