zsh的使用

打开终端,显示下面内容

Last login: Sat May 23 18:16:41 on ttys000

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.

airdeMacBook-Air:~ air$ 

在 MacOS Catalina 上将 zsh 用作默认 Shell

常用命令

1. 查看所有shell

cat /etc/shells

输出下面内容

air@airdeMacBook-Air ~ % 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

2. 查看当前shell

echo $0

输出下面内容

airdeMacBook-Air:bin air$ echo $0

-bash

3. 修改系统默认shell为zsh

chsh -s /bin/zsh

注意 修改完成后必须重启终端才能生效

安装oh-my-zsh

终端输入

sh -c “$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”

安装完成,输出内如果您见下
zsh的使用_第1张图片

终端窗口颜色配置

可做参考
zsh的使用_第2张图片

你可能感兴趣的:(macOS,Catalina之美)