ubuntu下 oh-my-zsh 安装及配置

oh-my-zsh git地址

https://github.com/robbyrussell/oh-my-zsh

step1 安装zsh (已经安装可省略)

官方解释

Zsh should be installed (v4.3.9 or more recent). If not pre-installed (zsh –version to confirm), check the following instruction here: Installing ZSH

检查zsh版本是否大于等于v4.3.9

  • 检查是否安装zsh $ cat /etc/shells
  • 查看版本 $ zsh –version

安装zsh

sudo apt-get install zsh

step2 安装oh-my-zsh

一键安装(二选一)

curl方式
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

wget方式
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

普通安装

摘录自https://github.com/robbyrussell/oh-my-zsh

Manual Installation

1. Clone the repository:
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

2. Optionally, backup your existing ~/.zshrc file:
cp ~/.zshrc ~/.zshrc.orig

3. Create a new zsh configuration file
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

4. Change your default shell
chsh -s /bin/zsh

5. Initialize your new zsh configuration
Once you open up a new terminal window, it should load zsh with Oh My Zsh's configuration.

step3 安装powerline (以便于使用一些好看的主题,例如agnoster)

安装powerline

sudo apt-get install powerline

安装powerline fonts

# clone
git clone https://github.com/powerline/fonts.git
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts

step4 更改putty等远程终端登录工具,支持Powerline字体,避免乱码

cd ~/.local/share/fonts目录下
选择一个自己喜欢的字体,在window下安装即可
## 安利下DejaVu字体,程序员最爱。
DejaVu Sans Mono Bold for Powerline.ttf
DejaVu Sans Mono Bold Oblique for Powerline.ttf
DejaVu Sans Mono for Powerline.ttf
DejaVu Sans Mono Oblique for Powerline.ttf 

大家这可以直接来这里下载DejaVu for Powerline.zip

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值