Colour ls on NetBSD


I realised using NetBSD in my homelab again just how much I’d come to rely upon colour as a visual cue. -F gets you useful hints like like / for directories and @ for symbolic links. But a week in, I do miss CLICOLOR=1 on FreeBSD.

NetBSD pkgsrc has colorls, which is easy enough to alias:

# pkgin install colorls
# echo alias ls="/usr/pkg/bin/colorls -FG" >> ~/.profile
# echo alias la="/usr/pkg/bin/colorls -aFG" >> ~/.profile

While I’m on the subject, colordiff does the same thing for diff, and colortail works wonders for immediately highlighting errors while tailing logs to troubleshoot.

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.