今天升級(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ǔ)消失。