DIRCOLORS(1)

๐Ÿ’… DIRCOLORS(1) โ€” bestie edition โœจ

okay so this is dircolors, from the User Commands girlies (section 1 of the manual, iykyk). she's the one who tells ls what colors to wear. yes, that's literally her whole job and she ATE. ๐ŸŽ€


๐ŸŒˆ NAME ๐ŸŒˆ

dircolors โ€” color setup for ls ๐Ÿ’–

like. she sets up the colors. for ls. that's the vibe. slay.


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

dircolors [OPTION]... [FILE]

that's it. options, then maybe a file if you're feeling main character energy. ๐Ÿซถ


โœจ DESCRIPTION โœจ

so basically dircolors spits out commands โ€” like, actual shell commands โ€” that set the LS_COLORS environment variable. that's the whole point. she doesn't set the colors herself, she gives you the receipts so you can set them. no cap. ๐Ÿ’…

๐ŸŽ€ Determine format of output: ๐ŸŽ€

okay so you gotta tell her what shell you're in, bestie. she can't read your mind (rude, ik).

  • -b, --sh, --bourne-shell โ€” outputs Bourne shell code to set LS_COLORS. if you're a bash/sh/zsh girlie, this is your moment. ๐Ÿ‘‘
  • -c, --csh, --c-shell โ€” outputs C shell code to set LS_COLORS. for the csh/tcsh girlies, we see you, we love you. ๐Ÿ“
  • -p, --print-database โ€” outputs the defaults. like, what colors she'd pick if you gave her zero input. the factory setting. the og. ๐ŸŒธ
  • --print-ls-colors โ€” outputs fully escaped colors for display. escaped. fully. so your terminal doesn't get confused and start tweaking. ๐Ÿ˜ญ
  • --help โ€” displays this help and exits. the "wait what does this do again" button. ๐Ÿ™ˆ
  • --version โ€” outputs version information and exits. for when you need to know exactly which girl you're talking to. โญ
ngl this next part matters: if a FILE is specified, she reads it to figure out which colors go with which file types and extensions. otherwise, a precompiled database is used instead. so like, no file? no problem, she's got one on deck. ๐Ÿฆ‹

and if you're curious about the format of these files โ€” like, the actual syntax, the lore โ€” you run:

dircolors --print-database

fr fr, that's how you learn the format. she literally tells you. iconic behavior. ๐Ÿ’–


๐ŸŒŸ AUTHOR ๐ŸŒŸ

Written by H. Peter Anvin. king shit. ๐Ÿ‘‘โœจ


๐Ÿ’€ REPORTING BUGS ๐Ÿ’€

found a bug? not the vibe, but okay, let's handle it:


Copyright ยฉ 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. like, zero. none. don't come for her. ๐Ÿ˜ญ

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€


and that's the whole page bestie ๐Ÿซถ this was GNU coreutils 9.12, dated September 2026 โ€” go forth and make your terminal pretty. periodt. ๐Ÿ’…โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from