Registered Member
|
What to the various text colors in Konsole signify? Files listed with ls have various colors. Some are fairly obvious. For instance, with the ls command directories (folders) are blue, ordinary files are black. That is pretty clear. Some files are in red. What does that mean? some files are sort of purple; they appear to be graphics files of one sort or another. Is there a list of what the default text colors for Konsole? Is Konsole applying those colors, or is that a function of ls?
|
Registered Member
|
It's a function of ls. Have a look at "man dir_colors"... The colors are defined in /etc/DIR_COLORS, and can be overridden on a per-user basis in ~/.dir_colors. |
Registered Member
|
Thank you for your assistance. I am running Linux Mint KDE 17.1 which doesn't seem to have a /etc/DIR_COLORS file, but your information that the color coding is done by ls rather than konsole led me to the answer.
I found the coding in /etc/bash.bashrc where there was a line that starts, "LS_COLORS=". That line and contains a string of color codes associating colors with varius different file types. At http://askubuntu.com/questions/466198/h ... he-console I found definitions for the file type and color codes used in bash.bashrc Thank you again. |
Registered Member
|
Yes, ls does take the colors from $LS_COLORS in the end. But dircolors can be used to set this environment variable. From the dir_colors man page:
Here on openSUSE, dircolors is run in /etc/profile.d/ls.bash. As dircolors is also part of coreutils (like ls), I thought this would be used by every distribution by default... (the link you posted does mention it too) |
Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]