- 查看所有的shell
cat /etc/shells
输出入下:
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
- 查看系统用户默认shell
cat /etc/passwd | grep sh
输出如下:
root:*:0:0:System Administrator:/var/root:/bin/sh
_sshd:*:75:75:sshd Privilege separation:/var/empty:/usr/bin/false
_update_sharing:*:95:-2:Update Sharing:/var/empty:/usr/bin/false
_mbsetupuser:*:248:248:Setup User:/var/setup:/bin/bash
## 可以看出root用户用的是sh,其他用户用的是bash
- 切换终端
## 系统默认的终端为bash,切换该终端为zsh
chsh -s /bin/zsh
## 切回默认终端bash
chsh -s /bin/bash