DIRCOLORS(1)

πŸ’… dircolors β€” oh you want your ls to be PRETTY pretty? say less bestie

okay so real talk, this one lives in the General Commands Manual section 1, and it's genuinely one of those tools that just quietly makes your whole terminal aesthetic go from mid to iconic. no cap. ✨


🌸 NAME 🌸

dircolors β€” spits out the commands you need to set the LS_COLORS environment variable. that's it. that's the whole job. and it ate. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

dircolors [OPTION]... [FILE]

✨ DESCRIPTION ✨

Output commands to set the LS_COLORS environment variable. πŸ¦‹

like. that's the vibe. you run it, you get shell code, you eval that shell code, and suddenly every folder is a different color and you feel something. 🌈


πŸ’… OPTIONS πŸ’…

  • -b, --sh β€” output Bourne shell code to set LS_COLORS
  • -c, --csh β€” output C shell code to set LS_COLORS
  • -p, --print-database β€” print the byte counts
  • --print-ls-colors β€” output fully escaped colors for display
  • -h, --help β€” Print help
  • -V, --version β€” Print version
not me side-eyeing -p saying "print the byte counts" because that is literally what the source says and I am NOT changing a single character of it. the facts stay the facts, bestie. πŸ™ˆ

πŸ”₯ EXTRA πŸ”₯

If FILE is specified, read it to determine which colors to use for which file types and extensions. Otherwise, a precompiled database is used. For details on the format of these files, run dircolors --print-database πŸ‘‘

so basically: want custom colors? hand it a file. don't want to deal? it's got a whole precompiled database ready to go, main character energy fr fr. πŸ’œ


⭐ VERSION ⭐

v(uutils coreutils) 0.12.0


πŸ¦‹ EXAMPLES πŸ¦‹

Output commands to set $LS_COLOR using default colors:

dircolors

Display each filetype with the color they would appear in ls:

dircolors --print-ls-colors

Output commands to set $LS_COLOR using colors from a file:

dircolors path/to/file

Output commands for Bourne shell:

dircolors [-b|--bourne-shell]

Output commands for C shell:

dircolors [-c|--c-shell]

View the default colors for file types and extensions:

dircolors [-p|--print-database]

The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. 😭

okay yes those examples say --bourne-shell and --c-shell while the OPTIONS section says --sh and --csh β€” I clocked it, you clocked it, and I am keeping BOTH exactly as written because that's what the page says. iykyk. πŸ’€

and that's the whole page babes 🫢 β€” this one's from the General Commands Manual, version v(uutils coreutils) 0.12.0, dated 2026-09-25, and honestly? go forth and make your ls output gorgeous. periodt. πŸ‘‘πŸŽ€πŸ’–

πŸ“¦ where this page comes from