zsh安装

简介: zsh安装

一.安装

1.安装 zsh

#下载oh-my-zsh

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

 

#移动文件

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

2.配置

在~/.zshrc 中可以看到我们使用的主题,默认使用的主题叫做 robbyrussell,可以在配置项找到这一行:

ZSH_THEME="robbyrussell" //用来指定 zsh 样式,主题样式可以在~/.oh-my-zsh/themes 目录下查看哦

配置完成后 source 一下就可以让主题生效啦 source ~/.zshrc

3.查看所有主题

# ls ~/.oh-my-zsh/themes`

3den.zsh-theme                 kardan.zsh-theme

Soliah.zsh-theme               kennethreitz.zsh-theme

adben.zsh-theme                kiwi.zsh-theme

af-magic.zsh-theme             kolo.zsh-theme

afowler.zsh-theme              kphoen.zsh-theme

agnoster.zsh-theme             lambda.zsh-theme

alanpeabody.zsh-theme          linuxonly.zsh-theme

amuse.zsh-theme                lukerandall.zsh-theme

apple.zsh-theme                macovsky-ruby.zsh-theme

arrow.zsh-theme                macovsky.zsh-theme

aussiegeek.zsh-theme           maran.zsh-theme

avit.zsh-theme                 mgutz.zsh-theme

awesomepanda.zsh-theme         mh.zsh-theme

bira.zsh-theme                 michelebologna.zsh-theme

blinks.zsh-theme               mikeh.zsh-theme

bureau.zsh-theme               miloshadzic.zsh-theme

candy-kingdom.zsh-theme        minimal.zsh-theme

candy.zsh-theme                mira.zsh-theme

clean.zsh-theme                mlh.zsh-theme

cloud.zsh-theme                mortalscumbag.zsh-theme

crcandy.zsh-theme              mrtazz.zsh-theme

crunch.zsh-theme               murilasso.zsh-theme

cypher.zsh-theme               muse.zsh-theme

dallas.zsh-theme               nanotech.zsh-theme

darkblood.zsh-theme            nebirhos.zsh-theme

daveverwer.zsh-theme           nicoulaj.zsh-theme

dieter.zsh-theme               norm.zsh-theme

dogenpunk.zsh-theme            obraun.zsh-theme

dpoggi.zsh-theme               peepcode.zsh-theme

dst.zsh-theme                  philips.zsh-theme

dstufft.zsh-theme              pmcgee.zsh-theme

duellj.zsh-theme               pygmalion-virtualenv.zsh-theme

eastwood.zsh-theme             pygmalion.zsh-theme

edvardm.zsh-theme              random.zsh-theme

emotty.zsh-theme               re5et.zsh-theme

essembeh.zsh-theme             refined.zsh-theme

evan.zsh-theme                 rgm.zsh-theme

fino-time.zsh-theme            risto.zsh-theme

fino.zsh-theme                 rixius.zsh-theme

fishy.zsh-theme                rkj-repos.zsh-theme

flazz.zsh-theme                rkj.zsh-theme

fletcherm.zsh-theme            robbyrussell.zsh-theme

fox.zsh-theme                  sammy.zsh-theme

frisk.zsh-theme                simonoff.zsh-theme

frontcube.zsh-theme            simple.zsh-theme

funky.zsh-theme                skaro.zsh-theme

fwalch.zsh-theme               smt.zsh-theme

gallifrey.zsh-theme            sonicradish.zsh-theme

gallois.zsh-theme              sorin.zsh-theme

garyblessington.zsh-theme      sporty_256.zsh-theme

gentoo.zsh-theme               steeef.zsh-theme

geoffgarside.zsh-theme         strug.zsh-theme

gianu.zsh-theme                sunaku.zsh-theme

gnzh.zsh-theme                 sunrise.zsh-theme

gozilla.zsh-theme              superjarin.zsh-theme

half-life.zsh-theme            suvash.zsh-theme

humza.zsh-theme                takashiyoshida.zsh-theme

imajes.zsh-theme               terminalparty.zsh-theme

intheloop.zsh-theme            theunraveler.zsh-theme

itchy.zsh-theme                tjkirch.zsh-theme

jaischeema.zsh-theme           tjkirch_mod.zsh-theme

jbergantine.zsh-theme          tonotdo.zsh-theme

jispwoso.zsh-theme             trapd00r.zsh-theme

jnrowe.zsh-theme               wedisagree.zsh-theme

jonathan.zsh-theme             wezm+.zsh-theme

josh.zsh-theme                 wezm.zsh-theme

jreese.zsh-theme               wuffers.zsh-theme

jtriley.zsh-theme              xiong-chiamiov-plus.zsh-theme

juanghurtado.zsh-theme         xiong-chiamiov.zsh-theme

junkfood.zsh-theme             ys.zsh-theme

kafeitu.zsh-theme              zhann.zsh-theme

4.修改 zsh 主题

sudo vim ~/.zshrc将 ZSH_THEME="" 修改为 random 可以每次开启终端都随机一个,就比较变态,完美解决选择困难症患者

#好看的主题

[oh-my-zsh] Random theme 'sonicradish'

sonicradish

intheloop

gallois   待选

fox

itchy

gnzh    在用

  • oh-my-zsh 配置文件和主题配置

# 1.默认配置文件的位置

 

- vim ~/.zshrc

 

# 2.修改主题配置

 

- ZSH_THEME="robbyrussell"

 

# 3.重载配置生效

 

- exec zsh

5.更新 zsh

omz update

二.使用

1.安装

#安装

yum-yinstallzsh

2.配置

#编辑

vim~/.zshrc

 

#生效

source~/.zshrc

 

aliascdtmp='cd `mktemp -d /tmp/sorrycc-XXXXXX`'

aliasip="ipconfig getifaddr en0 && ipconfig getifaddr en1"

aliashosts="vi /etc/hosts"

 

functionmcd {

 mkdir$1&&cd$1;

}

3.更新

omz update


相关文章
|
Ubuntu Shell 开发工具
Ubuntu 20.04 配置 zsh
Ubuntu 20.04 配置 zsh
786 0
Ubuntu 20.04 配置 zsh
|
开发工具 git
iterm2 oh-my-zsh 自动提示命令
iterm2 oh-my-zsh 自动提示命令
iterm2 oh-my-zsh 自动提示命令
|
Python
ZSH、oh-my-zsh安装教程及插件和主题推荐
ZSH、oh-my-zsh安装教程及插件和主题推荐
1149 0
|
Linux Shell 开发工具
MacOS安装Homebrew与Oh-My-Zsh
MacOS安装Homebrew与Oh-My-Zsh
2574 0
|
Java Apache Maven
maven安装与zsh环境变量配置
maven安装与zsh环境变量配置
jekyll 配置环境变量——zsh
在尝试使用github搭建个人主页的过程中,遇到了一些问题,这里记录下。 在安装ruby、gem之后,通过gem安装jekyll后,执行`jekyll -v`命令时遇到`zsh: command not found: jekyll`错误,很明显这个是环境变量的问题。 这里我的终端使用的zsh,不是mac自带的。 最后通过gem重新安装jekyll,然后根据终端中的提示来配置环境变量。
Mac终端使用oh-my-zsh中文乱码
[oh-my-zsh](https://ohmyz.sh/)是个好东西,我就不多介绍了。 但是默认却对中文支持不太好,有时候在服务器端查看中文会显示乱码。
|
Shell 开发工具 git
|
Shell 开发工具 git
Zsh使用入门
Zsh使用入门
4148 0