Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/wwwroot/phxin.top/usr/themes/Joe/public/config.php on line 19

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/wwwroot/phxin.top/usr/themes/Joe/public/config.php on line 20

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/wwwroot/phxin.top/usr/themes/Joe/public/config.php on line 21

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/wwwroot/phxin.top/usr/themes/Joe/public/config.php on line 22

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/wwwroot/phxin.top/usr/themes/Joe/public/config.php on line 23
zsh终端和bash终端 - Hello World

zsh终端和bash终端

清歌
2022-10-17 / 0 评论 / 0 阅读 / 正在检测是否收录...

查看shell类型

echo $0

请输入图片描述

二者的区别

bash上手快,基本直接就可以使用,但是zsh则需要繁杂的配置
zsh有几大特点明显优于bash,具体特点如下:
  • 色彩高亮、拼写检查: 根据你输入的内容来判断颜色种类,例如:白色代表普通命令或者程序内容,红色代表错误命令等;
  • 命令提示:这个可以说是最方便的功能,输入某命令后,后面就用灰色给你提示该命令的参数,随着动态不断输入,提示还会根据内容不断更新;

终端的安装

bash安装

ubuntu的默认的终端就是bash

zsh安装
  • 安装zsh
sudo apt-get install zsh
  • 修改默认的Shell改成zsh
chsh -s /bin/zsh
  • 安装oh-my-zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
报错

如果总是报 chsh: PAM: Authentication failure, 则需配置密码文件,
解决chsh: PAM认证失败的问题,输入:sudo vim /etc/passwd
把第一行的/bin/bash改成/bin/zsh,这个是root用户的。
把当前用户的/bin/bash改成/bin/zsh,一般安装后默认已经是zsh。

0

评论 (0)

取消