I'm trying to change my default shell in RHEL5 from zsh to bash.
I tried to the methods mentioned in this thead. By typing sudo /usr/bin/chsh -s /bin/bash
, the system says sudo: /usr/bin/chsh: command not found
. But the /usr/bin/chsh is there. Another way I found is to edit /etc/passwd file with my usrid, but it forbids me from editing it. Any suggestions?
Linux – change default shell from zsh to bash
bashredhat-enterprise-linuxshellzsh
Best Answer
Make sure
/usr/bin/chsh
has execute permissions by runningsudo chmod a+x /usr/bin/chsh
.You should be able to run
chsh
using your own account. Otherwise you'd be settingroot
's shell. Try the following: