Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #37426
| From | Lew Pitcher <lew.pitcher@digitalfreehold.ca> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: text colors in terminals (ls command) |
| Date | 2023-03-05 16:14 +0000 |
| Organization | The Pitcher Digital Freehold |
| Message-ID | <tu2f4o$1carh$1@dont-email.me> (permalink) |
| References | <ttv2r2$uish$1@dont-email.me> |
On Sat, 04 Mar 2023 17:25:49 +0800, Bazza wrote: > In Alma Linux 9, the ls command shows directories in dark blue, which is > hard to read. One can use ls --color=never to avoid this. > konsole seems broken: ls shows directories with 47m in front, e.g. > 47mDownloads I presume 47 is the code for dark blue. > ls command in terminal, xfce-terminal show the dark blue. > ye olde xterm seems best: off-white background, so directories are > visible > > In Debian, ls shows directories in blue, but no so stupidly dark as > Alma. For ls(1), you signal whether to use (or not) a colour palette by setting the --color option. Often, a distribution will set (through the /etc/profile script or one of the scripts in /etc/profile.d) an alias for ls(1) that specifies --color=always. You can disable colourization by altering or unsetting this alias, or specifying ls with the --color=none option. If you prefer ls(1) to colourize it's listing, but don't like the colours it uses, you can change the colours to your liking. ls(1) determines how to colourize from the value stored in the LS_COLORS environment variable. The same /etc/profile script that sets the ls(1) alias often sets the LS_COLORS envvar by eval(uating) the output of the dircolors(1) command. You can /alter/ the colours used by ls(1) by changing the information stored in the LS_COLORS envvar, or (more globally) by altering the information output by the dircolors(1) command. dircolors(1) /may/ use an input configuration file, but has a "database" of colours compiled into it, to use if you do not specify a config file. /If/ your setup uses dircolors(1) with a config file, you can alter the contents of that config file to give you a more pleasing palette. Otherwise, you may be stuck with the colour palette that dircolors(1) was compiled with. It is worth noting that this colour palette maps ls item types (directories, files, special files, etc) to specific escape sequences /by/ terminal type, as each terminal (emulated or real) may use different escape sequences for colourization. The colour mappings may not be obvious from the escape sequences: read the doc on the terminal /you/ use to ensure that you select the correct sequence. HTH -- Lew Pitcher "In Skills We Trust"
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
text colors in terminals (ls command) Bazza <suzywng@outlook.com> - 2023-03-04 17:25 +0800
Re: text colors in terminals (ls command) Rob van der Putten <rob@sput.nl> - 2023-03-04 10:41 +0100
Re: text colors in terminals (ls command) "Nuno Silva" <nunojsilva@invalid.invalid> - 2023-03-05 10:04 +0000
Re: text colors in terminals (ls command) Rob van der Putten <rob@sput.nl> - 2023-03-05 12:01 +0100
Re: text colors in terminals (ls command) Anthk <anthk@disroot.org> - 2023-03-24 15:39 +0000
Re: text colors in terminals (ls command) Grant Taylor <gtaylor@tnetconsulting.net> - 2023-03-04 10:27 -0700
Re: text colors in terminals (ls command) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2023-03-05 16:14 +0000
Re: text colors in terminals (ls command) Eli the Bearded <*@eli.users.panix.com> - 2023-03-05 22:23 +0000
Re: text colors in terminals (ls command) Anthk <anthk@disroot.org> - 2023-03-24 15:39 +0000
csiph-web