colorsterminaliterm2itermls-colors

Change colors on executable files in the terminal (or iTerm2)


How do I change it, so executable files don't have another color, compared to other files? I'm on macOS Sierra (10.12.6). It's the same, both in the regular Terminal:

Terminal executable files - color red

... or in iTerm2:

iTerm2 executable files - red color

It's frustating to look at. If i write chmod -x [FILENAME] then it disappears. But I don't want to change if the files are executable or not, - I want to change the color of executable files. I want my files to look like this (regardless of if it's executable or not):

Usual iTerm2 colors


Solution

  • I tried correcting Anshuman's answer, so it could help people with the potential same challenges. His answer pointed me in the right direction, but was pretty far from the answer to the question. So I'll post it here myself.

    The LSCOLORS are set in your ~/.bash_profile (or ~/.zshrc-file, if you use Zshell) for your environment. On this page, then you can experiment a bit with the settings and see which letters changes which colors. It's in your current LSCOLORS that it's setting the color of your executable files to be another color. Here's how you find (and change) that color:

    Go to your terminal and write:

    echo $LSCOLORS
    

    then it'll print out your current setup, which might be something along these lines:

    Gxfxcxdxbxegedabagacad
    

    If you then (in this case) change it to this:

    GxfxcxdxDxegedabagacad
    

    Then it would change the colors of the executable files. And what that change comes down to, is which color in your profile, it's pointing to:

    colors in iTerm2