Mac – Fixing Color Scheme Not Applied in iTerm2

itermiterm2macterminal

I haven't been able to apply any color scheme to iTerm2.

It looks like that the Basic Colors are applied, but the ANSI Colors are not (as shown in Preferences>Profiles>Colors).

Using Mac OSX 10.7.2. Any help?

Best Answer

I've been having the same issue and this is what seems to have solved it:

In your .bash_profile set CLICOLOR before setting TERM:

# Set CLICOLOR if you want Ansi Colors in iTerm2 
export CLICOLOR=1

# Set colors to match iTerm2 Terminal Colors
export TERM=xterm-256color

save bash file and source:

source ~/.bash_profile 

Then, in your iTerm2 Preferences > Profiles > Terminal > Report Terminal Type, set to either xterm-256color or xterm

Close iTerm2, restart it and type ls. That did the trick for me.

Good luck.


Catalina and ZSH

If using ZSH, which is the default shell in Catalina and later, use ~/.zprofile, instead of ~/.bash_profile.

Related Question