nanopi是基于ubuntu16.04LTS,自帶的bash終端總覺(jué)的有點(diǎn)不舒服禁偎,有一款終端不錯(cuò)還可以更換主題。oh my zsh。https://ohmyz.sh/
下面我們來(lái)反nanopi的終端美化一下爽柒。
首先安裝zsh,我們先看一下者填,我們有沒(méi)有zsh浩村。
$ cat /etc/shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
$ echo $SHELL //查看我們當(dāng)前使用的shell
/bin/bash
當(dāng)前,我們是沒(méi)有安裝zsh的占哟。使用的是默認(rèn)的bash心墅。
安裝
先安裝zsh
$ sudo apt-get install zsh
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
aspell aspell-en dictionaries-common emacsen-common libaspell15 libenca0 libfaad2 libjack-jackd2-0 libmodplug1
libmpcdec6 libopus0 libopusfile0 librcc0 librcd0 libresid-builder0c2a libsidplay2v5 libsidutils0 libspeex1
libtag1v5 libtag1v5-vanilla libtagc0 libtext-iconv-perl
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
zsh-common
Suggested packages:
zsh-doc
The following NEW packages will be installed:
zsh zsh-common
0 upgraded, 2 newly installed, 0 to remove and 250 not upgraded.
Need to get 3,724 kB of archives.
After this operation, 14.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main arm64 zsh-common all 5.1.1-1ubuntu2.3 [3,182 kB]
Get:2 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main arm64 zsh arm64 5.1.1-1ubuntu2.3 [542 kB]
Fetched 3,724 kB in 5s (648 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package zsh-common.
(Reading database ... 45962 files and directories currently installed.)
Preparing to unpack .../zsh-common_5.1.1-1ubuntu2.3_all.deb ...
Unpacking zsh-common (5.1.1-1ubuntu2.3) ...
Selecting previously unselected package zsh.
Preparing to unpack .../zsh_5.1.1-1ubuntu2.3_arm64.deb ...
Unpacking zsh (5.1.1-1ubuntu2.3) ...
Setting up zsh-common (5.1.1-1ubuntu2.3) ...
Setting up zsh (5.1.1-1ubuntu2.3) ...
update-alternatives: using /bin/zsh5 to provide /bin/zsh (zsh) in auto mode
update-alternatives: using /bin/zsh5 to provide /bin/rzsh (rzsh) in auto mode
查看一下有沒(méi)有安裝上,
$ cat /etc/shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/bin/zsh
/usr/bin/zsh //已經(jīng)有zsh了
把zsh修改為默認(rèn)shell
$ chsh -s /bin/zsh
安裝oh my zsh
$ sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
image
這樣就安裝上了
修改主題
更改主題和加插件榨乎,編輯文件==~/.zshrc==
$ vim ~/.zshrc
ZSH_THEME="ys" //更改主題怎燥,我比較喜歡ys
$ source ~/.zshrc
image
可以在==~/.oh-my-zsh/themes==查看都有什么主題
安裝插件
安裝autojump插件
$ sudo apt-get install autojump
$ vim ~/.zshrc
#在最后一行加入
. /usr/share/autojump/autojump.sh
$ source ~/.zshrc 生效
安裝自動(dòng)補(bǔ)齊插件
$ cd ~/.oh-my-zsh/plugins/
$ mkdir incr
$ cd incr
$ wget http://mimosa-pudica.net/src/incr-0.2.zsh
$ vim ~/.zshrc
#在最后加入
source ~/.oh-my-zsh/plugins/incr/incr-0.2.zsh
$ source ~/.zshrc 生效
安裝語(yǔ)法高亮zsh-syntax-highlighting
$ cd ~/.oh-my-zsh/plugins
$ vim ~/.zshrc
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
#在最后加入
source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
$ source ~./zshrc
安裝語(yǔ)法歷史記錄
$ git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
$ vim ~/.zshrc
# 修改
plugins=(git extract z zsh-autosuggestions)
$ source ~/.xshrc
現(xiàn)在終端好看了許多
博客網(wǎng)站 :
ccbirds.cn
ccbirds.github.io