I want to change my shell from the default bash shell to zsh on my Amazon EC2 instances. How do I go about doing it? Thanks!

link|improve this question
feedback

1 Answer

up vote 9 down vote accepted

Try using the chsh command.

e.g.

chsh -s /bin/zsh

You can confirm the location of zsh by running whereis zsh, or alternatively simply run

chsh -s $(which zsh)

If you want to change the shell for a user account other than the one you're logged into, you'll need to run it as root, so to change john's shell, do:

sudo chsh -s $(which zsh) john
link|improve this answer
I did try that, but with the root user!! My AMI Image has ubuntu rather than root. Had to switch to ubuntu user to change the shell! Thanks for the hint :) – Paddy Jan 11 '11 at 11:45
@Paddy if you are root you can change it for another user by running chsh -s /bin/zsh username. – John T Jan 11 '11 at 11:47
Awesome :) Much easier. Thanks for that info too. – Paddy Jan 11 '11 at 11:48
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.