1.安装基本工具

sudo apt update && sudo apt upgrade -y
sudo apt install zsh git curl -y

2.设置默认终端

chsh -s /bin/zsh

3.安装oh-my-zsh

通过下列任一方式安装:

Method Command
curl sh -c "$(curl -fsSL https://install.ohmyz.sh/)"
wget sh -c "$(wget -O- https://install.ohmyz.sh/)"
fetch sh -c "$(fetch -o - https://install.ohmyz.sh/)"
国内curl镜像 sh -c "$(curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"
国内wget镜像

sh -c "$(wget -O- https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"

4.下载自己喜欢的主题

注:本部非必要,因为在前面安装时已经完成下载到相应的theme目录中。

sudo wget -O $ZSH_CUSTOM/themes/bira.zsh-theme https://cdn.haoyep.com/gh/leegical/Blog_img/zsh/bira.zsh-theme

5.修改.zshrc,设置为自己喜欢的主题

将配置文件中的ZSH_THEME设置为rkj-repos。想要看最终效果进行选择,可以查看各主题的截图(主题截图

6.设置默认终端为zsh

打开终端窗口->设置->配置文件->编辑->命令,设置为:/bin/zsh

7.终端的一些外观设置

自己喜欢的配置是:字体选Monospace,字号选12,颜色选“Linux 颜色”。

另外,可以到nerdsfont中下载安装相应的字体,才会有一些特殊字符显示特殊效果。

还要安装fonts-powerline字体:

sudo apt install fonts-powerline