Colour ls on NetBSD

Software

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

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

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

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!