lsd — The Next Gen ls Command with Icons and Colors
lsd is a Rust-powered replacement for `ls` with Nerd-Font icons, colors, tree view, Git indicators, and sane defaults for human-readable file listings.
What it is
lsd (LSDeluxe) is a modern replacement for the Unix ls command written in Rust. It adds Nerd Font icons, color-coded file types, tree view, Git status indicators, and human-readable file sizes. The output is immediately more informative than standard ls while remaining compatible as a drop-in replacement.
lsd targets developers and system administrators who spend significant time in the terminal and want better file listing visibility. It works on macOS, Linux, and Windows.
How it saves time or tokens
lsd provides more information at a glance than standard ls. Color-coded file types let you instantly distinguish directories from executables, symlinks, and regular files. Git indicators show modified, untracked, and staged files without running git status. Tree view replaces the need for a separate tree command. These visual cues reduce the mental parsing time when navigating codebases.
How to use
- Install lsd:
brew install lsd
- Set up aliases for seamless replacement:
alias ls=lsd
alias ll='lsd -lah --blocks permission,size,date,name --date relative'
alias tree='lsd --tree -I node_modules'
- Use the same flags you already know from
ls.
Example
Common lsd workflows:
# Detailed listing with relative dates
lsd -lah --date relative
# Tree view excluding node_modules
lsd --tree --depth 3 -I node_modules -I .git
# Sort by modification time
lsd -lt
# Group directories first
lsd --group-dirs first
# Show Git status indicators
lsd -l --git
# Output shows M for modified, ? for untracked
The icons and colors require a Nerd Font installed in your terminal.
Related on TokRepo
- AI Tools for Coding — Development tools that enhance the terminal coding experience
- AI Tools for DevOps — DevOps tools for terminal productivity and system administration
Common pitfalls
- Icons require a Nerd Font (like FiraCode Nerd Font or JetBrainsMono Nerd Font) installed and configured in your terminal emulator. Without it, icons appear as empty squares.
- Color output may not display correctly in terminals with limited color support. Ensure your terminal supports 256 colors or true color.
- Some
lsflags have slightly different behavior in lsd. Test your aliases before adding them to your shell profile permanently. - Always check the official documentation for the latest version-specific changes and migration guides before upgrading in production environments.
- For team deployments, establish clear guidelines on configuration and usage patterns to ensure consistency across developers.
Frequently Asked Questions
Yes for most use cases. lsd supports the common ls flags like -l, -a, -h, -t, and -r. Some obscure flags may differ. Set up aliases to integrate lsd seamlessly into your workflow.
Nerd Fonts are patched versions of popular programming fonts that include additional icon glyphs. lsd uses these icons to display file type indicators. Install a Nerd Font from nerdfonts.com and set it as your terminal font.
Yes. Use the --git flag to see Git status indicators next to files and directories. Modified, untracked, staged, and ignored files are marked with different indicators.
Yes. lsd reads configuration from a YAML file (usually ~/.config/lsd/config.yaml). You can customize colors for file types, icon sets, date formats, and layout options.
Yes. lsd runs on Windows, macOS, and Linux. Windows users can install via Chocolatey, Scoop, or Winget. The same Nerd Font requirement applies for icon display.
Citations (3)
- lsd GitHub— lsd is a modern ls replacement written in Rust
- Nerd Fonts— Nerd Font icons for terminal file listings
- lsd Documentation— Git integration for file status indicators
Related on TokRepo
Discussion
Related Assets
Heimdall — Application Dashboard for Your Server
Heimdall is an elegant self-hosted application dashboard that organizes all your web services and apps into a single, customizable start page with enhanced tile features.
Healthchecks — Cron Job Monitoring with Smart Alerts
Healthchecks is a self-hosted cron job and scheduled task monitor that alerts you when your periodic jobs fail to run on time.
Shiori — Simple Self-Hosted Bookmark Manager
Shiori is a lightweight self-hosted bookmark manager written in Go with full-text search, archiving, and a clean web interface for organizing your saved links.