Shell 切换解释器,查看当前解释器

  • 可以通过 chsh 修改解释器。
  • 查看当前所安装的解释器列表
1
shell复制代码$ cat /etc/shells
1
2
3
4
5
6
7
8
9
10
11
bash复制代码# 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
  • 查看当前解释器
1
shell复制代码$ echo $SHELL
1
bash复制代码/bin/zsh
  • 切换 bash
1
shell复制代码$ chsh -s /bin/bash
  • 切换 zsh
1
shell复制代码$ chsh -s /bin/zsh

本文转载自: 掘金

开发者博客 – 和开发相关的 这里全都有

0%