zsh
zsh可以提供命令參數自動補全和提示.和傳統的TAB補全不同,傳統的TAB補全並不會提示命令參數。讓命令不再成爲負擔,總之這是一款提供生產力的工具。
步驟一. 替換yum的源爲阿里雲
- 先備份之前的源配置。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
- 下載阿里源配置。
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
- 生成緩存。
yum makecache
步驟二.安裝git
yum install git
步驟三. 安裝zsh,並設置爲默認shell
- 安裝zsh。
yum -y install zsh
- 設置zsh爲默認shell。
chsh -s /bin/zsh
- 重啓centos。
reboot
步驟四. 安裝on my zsh
- 安裝。
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
舉例子
tar 命令
如果你忘記了tar命令的參數, 在敲TAB後,會自動列出參數。並且說明每個參數的作用,如下。