树莓派进阶之路 (035) - 基于linux的zsh安装脚本

本文介绍如何在Linux Ubuntu环境下安装和配置ZSH及Oh My Zsh,并提供常用别名设置与插件安装步骤。

基于linux的zsh安装脚本:

Ubuntu版本:

 1 #!/bin/sh
 2 
 3 cd 
 4 #安装zsh
 5 sudo apt-get install zsh
 6 #查看zsh
 7 cat /etc/shells
 8 #更改zsh
 9  chsh -s /bin/zsh
10 #自动安装:
11 wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
12 #下载
13 git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
14 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
15 #设置
16 cd pi/pi_sh/
17 cat zsh.txt >> ~/.zshrc
18 
19 #安装插件
20 sudo apt-get install python
21 cd
22 git clone git://github.com/joelthelion/autojump.git
23 cd autojump
24 sudo ./install.py
zsh.txt 
 1 alias cls='clear'
 2 alias ll='ls -l'
 3 alias la='ls -a'
 4 alias vi='vim'
 5 alias javac="javac -J-Dfile.encoding=utf8"
 6 alias grep="grep --color=auto"
 7 alias -s html=mate   # 在命令行直接输入后缀为 html 的文件名,会在 TextMate 中打开
 8 alias -s rb=mate     # 在命令行直接输入 ruby 文件,会在 TextMate 中打开
 9 alias -s py=vi       # 在命令行直接输入 python 文件,会用 vim 中打开,以下类似
10 alias -s js=vi
11 alias -s c=vi
12 alias -s java=vi
13 alias -s txt=vi
14 alias -s gz='tar -xzvf'
15 alias -s tgz='tar -xzvf'
16 alias -s zip='unzip'
17 alias -s bz2='tar -xjvf'

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值