How to set zsh as default shell in openvz container?

392 views Asked by At

I'm running a vz container (debian) on PVE, and I'd like to use zsh as my default shell when i run :

vzctl enter MY_CONTAINER_ID

I tried to run chsh in the container but it as no effect, unless I run su root, i'm still using bash.

Is-it at least possible ?

Anyone has succesfully achieved this ?

2

There are 2 answers

0
Bactisme On BEST ANSWER

A post on the openvz ask the same question and the reply indicate that /bin/bash is hardcoded in the code of vzctl.

0
n00dl3 On

When there is a will, there is a way !

I replaced the whole content of ~/.bashrc with :

zsh && exit

And it did the job... Maybe it's a bit hacky, but found no other way...