The default interactive shell is now zsh.

今天升級(jí)了macOS Catalina

1:在使用命令臺(tái)時(shí)出現(xiàn)了:

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風(fēng)格,提示語(yǔ)告知現(xiàn)在新系統(tǒng)的shell已經(jīng)更換為zsh,請(qǐng)用此 `chsh -s /bin/zsh` 命令切換。

3:查看系統(tǒng)支持的shell風(fēng)格命令:

1cat?/etc/shells

4:我系統(tǒng)支持的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) 繼續(xù)使用bash,但又不想出現(xiàn)提示語(yǔ),則在

vim ~/.bash_profile

 .bash_profile文件最下方加上

# macOS Catalina

export?BASH_SILENCE_DEPRECATION_WARNING=1

  :wq 保存退出重新打開(kāi)命令行警示語(yǔ)消失。

引用?https://www.cnblogs.com/KuJo/p/11643142.html

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容