iTerm2配色设置

本文介绍了如何配置iTerm2的配色方案。首先确保已安装iTerm2,然后将指定文本添加到.bash_profile文件,并执行命令使其生效。接着从GitHub上的iTerm2-Color-Schemes仓库克隆或下载zip包,选择并导入你喜欢的配色方案,如Ubuntu。

请确认本地已经安装了 iTerm2

配置 ~/.bash_profile

  • 执行命令 vim ~/.bash_profile 将下面文本复制到~/.bash_profile 文件中(可放置最上方)
#enables colorin the terminal bash shell export
export CLICOLOR=1

#sets up thecolor scheme for list export
export LSCOLORS=gxfxcxdxbxegedabagacad

#sets up theprompt color (currently a green similar to linux terminal)
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '

#enables colorfor iTerm
export TERM=xterm-256color
if [ -x /usr/bin/dircolors ]; then
        alias ls='ls --color=auto'
        alias dir='dir --color=auto'
        alias vdir='vdir --color=auto'
        alias grep='grep --color=auto'
        alias fgrep='fgrep --color=auto'
        alias egrep='egrep --color=auto'
        alias tree='tree -C'
fi
  • 执行 source ~/bash_profile 命令使配置生效

到这里就完成了配色的设置,如果需要使用不同的配置内容可继续下面操作。

选择合适的 iTerm2-Color-Schemes

按照上图导入喜欢的配色方案即可,例如: Ubuntu。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值