电脑技术

iterm2 + Oh My Zsh 让我的终端上天

2020-05-11  本文已影响0人  胡小喵_

iterm2介绍

Mac OS自带的终端,用起来虽然有些不太方便,界面也不够友好,iTerm2是一款相对比较好用的终端工具。iTerm2常用操作包括主题选择、声明高亮、自动填充建议、隐藏用户名和主机名、分屏效果等。

安装 iterm2

官网就能下

配置 item2

zsh 配置

echo $SHELL

一般 mac 比较老版本默认为 bash,新版本默认为 zsh

cat /etc/shells

一般会有下列终端信息:

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

chsh -s /bin/zsh

oh-my-zsh 安装

重点来了,这里将介绍 oh-my-zsh 的安装。

curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
iterm2 + Oh My Zsh 让我的终端上天1.png

出现上面的画面那么恭喜你可以一键安装成功。
出现下面这个界面,那就是被墙了。我试过配置host及使用代理的方式都没有解决。所以在这种情况下推荐使用下面方法。(如果你们有解决办法欢迎在评论区留言~)


iterm2 + Oh My Zsh 让我的终端上天2.png

二、配置 iTerm2 主题

iTerm2 最常用的主题是 Solarized Dark theme,下载地址:http://ethanschoonover.com/solarized

下载的是压缩文件,解压,然后打开 iTerm2,按Command +键,打开 Preferences 配置界面,然后Profiles -> Colors -> Color Presets,在下拉列表中选择 Import,选择刚才解压的solarized->iterm2-colors-solarized->Solarized Dark.itermcolors文件.导入成功后,在 Color Presets下选择 Solarized Dark 主题,就可以了。

上一篇 下一篇

猜你喜欢

热点阅读