用于列出可用 shell 的终端命令

dee*_*_86 9 command-line

我需要检查哪些外壳可用。哪个命令在终端中为我提供了可用的(已安装的 shell,如 tcsh、csh、bsh)shell?

A.B*_*.B. 13

打开终端并运行以下命令:

cat /etc/shells
Run Code Online (Sandbox Code Playgroud)

示例输出:

% cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/bin/zsh
/usr/bin/zsh
/bin/ksh93
/bin/tcsh
/usr/bin/tcsh
/usr/bin/fish
/usr/bin/tmux
Run Code Online (Sandbox Code Playgroud)