linux 终端显示白底,mac终端使用Item2无法显示颜色的解决方法
item2是mac,linux下非常好用的一款終端機,可自行配置主題并支持tab等多種功能。
還在用單調(diào)的item嗎?不妨試試item2吧!
安裝完后發(fā)現(xiàn)item2終端是沒有顏色的(白底黑字),究其原因是Mac終端機預設是沒有顏色區(qū)分的,而對于開發(fā)者來說,顏色是多么重要(視覺疲勞有木有)!
那么如果想要像Linux一樣有顏色,那么需要自行設定~/.bash_profile文件(沒有的話自行創(chuàng)建)。
打開.bash_profile文件,添加配置如下
# enables color in the terminal bash shell
export CLICOLOR=1
# sets up the color scheme for list
export LSCOLORS=ExFxCxDxBxegedabagacad
# enables color for iTerm
export TERM=xterm-color
export TERM="xterm-color"
PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ '
# sets up proper alias commands when called
alias ls='ls -vG'
alias ll='ls -al'
alias la='ls -a'
alias vi='vim'
新增完重新打開item2終端機,就會出現(xiàn)漂亮的顏色了。
happy coding!
總結
以上是生活随笔為你收集整理的linux 终端显示白底,mac终端使用Item2无法显示颜色的解决方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: JAVA shell export_Ja
- 下一篇: dram sram利用 利用_使用量子力