This question already has an answer here:
If I wanted to use
zsh, for instance, rather than
bash, where would I make this change for the current user?
Chris Browne's answer works well if you don't have access to the user and have root privileges.
If you want to change the default shell of your current user you can also use:
The login shell of a user is defined in a file (
The last column is the login shell. It will be forked by the login program if successful.
However it is highly recommended that you do not modify this file by hand. You should use
You can change your login shell with the
The instructions for using
This will start an interactive session where you are prompted for the full path to your new shell.
On systems where you don't have sudo access or proper permission to use chsh (for example if you cannot add /bin/zsh to /etc/shell), then you can do it the old fashioned way:
This will replace the
I was trying to do this on a Synology device running DSM 5.1 with ash shell running. For some reason the