# man > dircolors(1)

---
type: CommandReference
command: dircolors
mode: man
section: 1
source: man-pages
---

## Quick Reference

- `dircolors` — output commands to set `$LS_COLOR` using default colors
- `dircolors --print-ls-colors` — display each filetype with the color they would appear in `ls`
- `dircolors {{path/to/file}}` — output commands to set `$LS_COLOR` using colors from a file
- `dircolors -b` — output commands for Bourne shell
- `dircolors -c` — output commands for C shell
- `dircolors -p` — view the default colors for file types and extensions

## Name

`dircolors` — color setup for `ls`

## Synopsis

`dircolors` [`_OPTION_`]... [`_FILE_`]

## Options

- `-b`, `--sh`, `--bourne-shell` — output Bourne shell code to set `LS_COLORS`
- `-c`, `--csh`, `--c-shell` — output C shell code to set `LS_COLORS`
- `-p`, `--print-database` — output defaults
- `--help` — display help and exit
- `--version` — output version information and exit

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`.

## Examples

shell
# 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 using colors from a file
dircolors /path/to/file

# Output for Bourne shell
dircolors -b

# Output for C shell
dircolors -c

# View default colors for file types and extensions
dircolors -p
## See Also

- [GNU coreutils online help](https://www.gnu.org/software/coreutils/)
- [Full documentation](https://www.gnu.org/software/coreutils/dircolors)
- Locally: `info '(coreutils) dircolors invocation'`