oh-my-zsh 精彩紛呈

這裏不囉嗦oh-my-zsh的種種優勢,也不講廢話。若是你進來,想必已經作好了使用或嘗試這款優秀終端shell的打算了。linux

直接開幹。git

安裝步驟github

安裝zsh安裝wget安裝git安裝oh-my-zshshell

1. 安裝zsh

首先,咱們能夠經過如下命令查看本機中已經存在的shell。bash

[root@Sheep /]# cat /etc/shells

/bin/sh
/bin/bash
/sbin/nologin
/bin/dash

下面咱們用apt-get包管理器安裝各類包,若是是CentOS,默認是不帶apt-get的,需提早安裝上服務器

也可用yum替代apt-getcurl

沒有zsh,安裝:工具

[root@Sheep /]# sudo apt-get install zsh

查看已安裝的shell網站

[root@Sheep /]# cat /etc/shells

/bin/sh
/bin/bash
/sbin/nologin
/bin/dash
/bin/zsh

至此,zsh安裝完成url

2. 安裝wget

使用下面的命令查看是否已經安裝wget包管理器

[root@Sheep /]# wget --version

若是沒有返回wget的版本號(或者報錯),則未安裝wget,運行下面的命令安裝:

[root@Sheep /]# sudo apt-get install wget

個人服務器上已經安裝了wget,所以輸出是下面的內容:

已加載插件:fastestmirror
設置安裝進程
Loading mirror speeds from cached hostfile
base: mirrors.sonic.net
extras: mirrors.sonic.net
updates: linux.mirrors.es.net
包 wget-1.12-8.el6.x86_64 已安裝而且是最新版本

至此,wget安裝也完成了

3. 安裝git

因爲oh-my-zsh是放在github.com網站上的內容,從起服務器上下載安裝包,需預先安裝git工具。
git工具是一款很是棒的版本管理工具,固然這裏的重點不是git。我只給你們講講怎麼安裝。

也很是簡單,就是一行命令的事情。

[root@Sheep /]# sudo apt-get install git

至此git也安裝好了

4. 安裝oh-my-zsh

繞了一大圈兒,終於講到正題。這款shell的漂亮之處就不贅述了。裝完以後看效果,你會愛不釋手!

如今咱們用這條命令了:

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


或者(固然,運行下面這條curl語句,就該提早安裝curl,通常linux系統是自帶的)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

若是你看到這麼一大段,就算基本完成shell命令行的美化了!

__                                     __
  ____  / /_     ____ ___  __  __   ____  _____/ /_
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/
                         ____/                       
....is now installed!
Please look over the ~/.zshrc file to select plugins, themes, and options.

p.s. Follow us at https://twitter.com/ohmyzsh.

p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.

還沒完,下面嘰步很重要:

改變默認shell:

[root@Sheep /]# sudo chsh -s /bin/zsh
[root@Sheep /]# echo $SHELL

第一行是設置zsh爲默認shell,第二行是查看當前運行的shell

能夠看見,如今的shell使用的是zsh了。

/bin/zsh

大功告成

如有紕漏,歡迎指正,感激涕零。 :)

相關文章
相關標籤/搜索