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:
... or in iTerm2:
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):
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 currentLSCOLORS
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:
then it'll print out your current setup, which might be something along these lines:
If you then (in this case) change it to this:
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:
set the LSCOLORS environment variable create an alias for ls so that it shows colors by default In your ~/.bash_profile add the following:
export LSCOLORS="EHfxcxdxBxegecabagacad"
alias ls='ls -lGH' <-----This shows in list format, follow symlinks colorized