Linux chsh command
The Linux chsh command is used to change the user's shell settings.
Permissions: All users.
Syntax
shell>> chsh
Examples
shell>> chsh Changing fihanging shell for user1 Password: [del] New shell [/bin/tcsh]: ### [是目前使用的 shell] [del] shell>> chsh -l ### 展示 /etc/shells 档案内容 /bin/bash /bin/sh /bin/ash /bin/bsh /bin/tcsh /bin/csh
Change the current shell. The current shell is set to //bin/bash. Use the chsh command to change the shell setting to /bin/csh.
# chsh Changing shell for root. New shell [/bin/bash]: /bin/csh //输入新的shell地址 Shell changed.
Change the current shell settings using the -s parameter.
# chsh -s /bin/csh //改变当前设置为 /bin/csh Changing shell for root. Shell not changed.Other Extensions
Linux Command Reference