【mac开发环境】第1篇:ITerm2+Oh My Zsh
文章目录
安装iTerm2
安装Oh My Bash
-
查看当前系统shell
- 使用命令::
cat /etc/shells -
命令结果:
# List of acceptable shells for chpass(1). # Ftpd will not allow users to connect who are not using # one of these shells. /bin/bash /bin/csh /bin/ksh /bin/sh /bin/tcsh /bin/zsh
- 使用命令::
-
使用
echo $SHELL查看当前系统使用的shell(1)一般mac自带的zsh不是最新版的,可以更新到最新版:
brew install zsh;
(2)zsh --version命令查看 zsh 的版本;
(3)修改默认 Shell,在 /etc/shells 文件中加入如下一行/usr/local/bin/zsh然后运行命令chsh -s /usr/local/bin/zsh;或者通过命令chsh -s $(which zsh)设置; -
安装Oh My Zsh
(1)项目主页:
https://github.com/robbyrussell/oh-my-zsh
(2)安装oh my zsh:sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
(3)为什么使用zsh -
设置agnoster主题
(1)修改
vim ~/.zshrc,然后把里面ZSH_THEME的值改为ZSH_THEME="agnoster"
(2)安装这个主题需要额外的font支持font设置
(3)设置配色,在iTerm2的Preferences——>Profiles——>colors——>Load Presets——>Solarized Dark即可设置终端配色
(4)修改字体,在iTerm2的Preferences——>Profiles——>Change font——> Source code pro for powerline -
引入
.bash_profile配置
找到zsh的配置文件.zshrc,在文件的尾部加入source .bash_profile - 修改mac系统自带终端字体为:
Cousine for Powerline - 其他参考文章
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论