Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

1 Answer

up vote 34 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
share|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
I'm getting: chsh: /usr/local/bin/zsh is an invalid shell – We are the World Feb 26 at 4:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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