MAC The default interactive shell is now zsh.

594 阅读1分钟

一、错误介绍

  • 升级 MAC 版本之后,终端报错:

    The default interactive shell is now zsh.
    To update your account to use zsh, please run `chsh -s /bin/zsh`.
    For more details, please visit https://support.apple.com/kb/HT208050.
    

    翻译为:

    默认的交互式 shell 现在是 zsh。
    要更新您的帐户以使用 zsh,请运行 `chsh-s/bin/zsh`。
    详情请访问 https://support.apple.com/kb/HT208050。
    

二、问题解决

  • 列出 shell 列表

    $ more /etc/shells
    
    /bin/bash
    /bin/csh
    /bin/dash
    /bin/ksh
    /bin/sh
    /bin/tcsh
    /bin/zsh
    
  • 以前老系统默认使用的是 /bin/bash,现在推荐使用 /bin/zsh,切换命令:

    $ chsh -s /bin/zsh
    
    dengzemiaodeMacBook-Pro:~ dengzemiao$ chsh -s /bin/zsh
    Changing shell for dengzemiao.
    Password for dengzemiao: 输入命令即可生效
    
  • 如果使用不习惯,可以切换原来的 /bin/bash,操作与上面一致

    $ chsh -s /bin/bash