# change the default shell for jexec



## n9010 (Dec 13, 2017)

Hi,

*I* recently changed the default shell of one of my servers to zsh, since *I*'m lazy *I* used to type `jexec <jailname>` to jump inside a jail. 
After *I* switched to zsh, *I* get an error because zsh is not installed inside the jails. 
I know that *I* can use  `jexec <jailname> /bin/csh`, but since *I*'m lazy *I* would like to avoid to write extra stuff.  Is there a way to  set which shell to use for jexec(8)?

Thanks


----------



## SirDice (Dec 13, 2017)

Why don't you simply define an alias?


----------



## tobik@ (Dec 13, 2017)

n9010 said:


> I know that i can use "jexec <jailname> /bin/csh", but since i'm lazy i would like to avoid to write extra stuff.


Define an alias?


----------



## n9010 (Dec 13, 2017)

SirDice said:


> Why don't you simply define an alias?


Seems like a solution so simple that is perfect. 
Thanks


----------



## spag (Apr 1, 2020)

FreeBSD 12.1: change the default shell for jexec - PushPanel.io
					

I want to have different shells in different jails. It looks like there is a bug that prevents that. How to solve? 1. What if starting jexec with a path to the shell? simple! *even you see you are using bash…. (make an alias) 2. What if to set up a default shell by chsh ... <a title="FreeBSD...




					pushpanel.io


----------

