In order to change shell for a particular user of Unix/Linux system without editing /etc/passwd file manually just use command:

chsh -s /path/to/shell username

for example, to change shell to ‘sh’ from ‘bash’ for user ‘viper’, use command:

chsh -s /bin/sh viper




  1. August 9, 2008  1:27 pm by Wouter den Dulk Reply


    One can also sudo vim /etc/passwd

    and change the shell column from sh to bash

    or anything else and then :wq

  2. Pingback : Quick shell change for user in Unix or Linux « Linux Admin Blog

  3. May 8, 2011  8:56 am by Rob Rasner IMDB Reply

    Sup we found this Quick shell change for user in Unix or Linux - Linux * Screw entry very worthwhile and so we have included an trackback to it on our web site, keep up the great work:) All the best ... Rob Rasner IMDB

  4. March 30, 2012  7:11 pm by fruit mocking party Reply

    Howdy! This is kind of off topic but I need some advice from an established blog. Is it difficult to set up your own blog? I'm not very techincal but I can figure things out pretty quick. I'm thinking about making my own but I'm not sure where to begin. Do you have any points or suggestions? Many thanks

  5. February 11, 2013  6:45 pm by DrupalFever Reply

    Thanks for the helpful tip. I just used your trick when changing the shell file on a user in a Client's web server.

Leave a reply


Your email address will not be published.