- 查看所有的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