macOS Catalina Terminal,提示 The default interactive shell is now zsh,解決方案


macOS升級Catalina后

1:在使用命令台時出現了:

 

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.

2:原我使用的是bash風格,提示語告知現在新系統的shell已經更換為zsh,請用此 `chsh -s /bin/zsh` 命令切換。

3:查看系統支持的shell風格命令:

cat /etc/shells

4:我系統支持的shell:

 

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.
localhost:~ yuzhilin$ 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
localhost:~ yuzhilin$

5:解決辦法

  (1) 不使用bash,切換zsh,`chsh -s /bin/zsh`命令切換即可。

  (2) 繼續使用bash,但又不想出現提示語,則在

 

vim ~/.bash_profile

  .bash_profile文件最下方加上

# macOS Catalina
export BASH_SILENCE_DEPRECATION_WARNING=1

  :wq 保存退出重新打開命令行警示語消失。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM