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 setLS_COLORS-c,--cshβ output C shell code to setLS_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-shelland--c-shellwhile the OPTIONS section says--shand--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
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms