You can theme exa’s output using the
which modify the colours used by filenames and other parts of the output.
By configuring one or both of these variables, you can tell exa to highlight certain files in a particular way; by configuring them a lot more, you can even change the way exa looks completely.
File extensions and colours
Although exa knows about a large number of file extensions,
its list will never be fully complete.
Perhaps your workflow involves processing files in an uncommon format, say,
other extensions, such as
.ts, have multiple meanings that exa may treat as a false positive.
ls supports changing this behaviour by setting the
LS_COLORS variable. Its format is a list of pairs of file name globs and colour codes, separated by equals signs, and then separated again with colons between the pairs:
The file name globs use the same format as ignoring files by glob does.
So in order to highlight
.xyz files in an extremely visible colour — let’s say white on red — you would set:
To additionally set
.ts files to a more calming blue, you would set:
It’s not the easiest syntax to read, so it’s important to notice the difference between the colons used to separate pairs from the semicolons used to write the colour codes.
File class colours
Before looking at a file’s extension, exa looks at the file’s class in the filesystem — whether it’s a directory, a socket, a link, or (in a special case) an executable file.
You can customise the colours used for each file by using one of these two-character-long keys with a colour:
For example, if you wanted to change both block and character devices to purple, you’d use:
Customising exa’s interface
exa has its own environment variable,
EXA_COLORS, which can be used as an exa-specific version of
File classes and globs in this variable will be read by exa but won’t be read by
The other more important use of
EXA_COLORS is that you can use it to customise parts of exa’s interface, including the colours for the permission bits, the date, user, inode, and other metadata columns, and punctuation such as arrows and tree characters.
To change these colours, set the relevant key in
EXA_COLORS to the colour code you want.
+xbit (file types)
suHigher bits (files)
sfHigher bits (other types)
xaExtended attribute marker
dfMajor device ID
dsMinor device ID
Owners and Groups
uuA user that’s you
unA user that’s not
guA group with you in it
gnA group without you
lcNumber of links
lmA multi-link file
Details and metadata
blNumber of blocks
hdTable header row
bOBroken link path
Here’s how you make timestamps a brighter shade of blue:
The colour codes used in
EXA_COLORS are ANSI escape codes.
These codes can tell the terminal emulator to do all sorts of things, including moving the cursor around and scrolling up and down, but exa only uses the ones that change the text colour.
To use them, combine one or more of the following with semicolons:
Here’s what you’d use for a bold-and-white-on-red file that means Java just crashed: