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

来源:互联网 发布:java实现简单的聊天室 编辑:程序博客网 时间:2024/05/16 04:37

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 Installation1. Clone the repository:git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh2. Optionally, backup your existing ~/.zshrc file:cp ~/.zshrc ~/.zshrc.orig3. Create a new zsh configuration filecp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc4. Change your default shellchsh -s /bin/zsh5. Initialize your new zsh configurationOnce 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

# clonegit clone https://github.com/powerline/fonts.git# installcd fonts./install.sh# clean-up a bitcd ..rm -rf fonts

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

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

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

0 0
原创粉丝点击