热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

macOSCatalinanewShell,解决Thedefaultinteractiveshellisnowzsh

https:www.cnblogs.comKuJop11643142.html今天升级了macOSCatalina1:在使用命令台时出现了:123Thedefaultinterac

https://www.cnblogs.com/KuJo/p/11643142.html

今天升级了macOS Catalina

1:在使用命令台时出现了:










1

2

3

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风格命令:










1

cat /etc/shells


4:我系统支持的shell:










1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

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,但又不想出现提示语,则在










1

vim ~/.bash_profile


 

  .bash_profile文件最下方加上










1

2

# macOS Catalina

export BASH_SILENCE_DEPRECATION_WARNING=1


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

 



推荐阅读
author-avatar
最陌生的挣扎2502893263
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有