Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Cvetan's avatar

How to use zsh config from host machine inside Homestead

I use zsh for some time with oh my zsh.

I have set plugins, theme and all the way I like.

There is option to use oh my zsh inside Homestead, so can I somehow use my existing config from host machine inside vm?

0 likes
2 replies
Cvetan's avatar

OK, I've found solution by slightly modifying idea from here: https://gist.github.com/Edofre/f0ede48d95c25148b5d0ab3213ec328c

Anyways I've enabled oh my zsh in Homestead.yaml, and added following to vagrantfile

config.vm.provision "shell", privileged: false, inline: "git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k"

config.vm.provision "file", source: "~/.zshrc", destination: ".zshrc"
Cvetan's avatar

One issue I still have, that if you already ran provisions and run them again this will fail. Because theme folder war already cloned with git so command fails.

Do you have any idea how to solve this?

Please or to participate in this conversation.