Unix&Linux大学教程(11):Shell

1.[bash] [csh] [ksh] .. 临时切换shell

control + D 退出

appledeMacBook-Air:~ apple$ bash
bash-3.2$ exit
appledeMacBook-Air:~ apple$ 

常见的shell分类

Unix&Linux大学教程(11):Shell_第1张图片
2.open /etc/shells 查看系统可用的shell

/bin/csh : 为本机默认shell

# 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/ksh
/bin/sh
/bin/tcsh
/bin/zsh

3.chsh -s [shell] 更改默认的shell

[appledeMacBook-Air:~] apple% chsh -s /bin/ksh
Changing shell for apple.
Password for apple: 
[appledeMacBook-Air:~] apple% 

重新打开终端

Unix&Linux大学教程(11):Shell_第2张图片

你可能感兴趣的:(Unix&Linux大学教程(11):Shell)