lsd
A terminal directory listing command with colors, icons, tree views, Git status, and configurable layouts.
Why consider lsd?
lsd is an open-source command-line tool written in Rust that enriches standard directory listings with icons, colors, recursive tree hierarchy, and metadata tables. It serves developers and sysadmins seeking a modern, highly configurable terminal file navigation utility.
Learn lsd by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide6 sections
Overview and Core Architecture
The official repository at https://github.com/lsd-rs/lsd introduces the project as The next gen ls command designed for Unix and Windows environments. Built to modernize terminal directory inspection, lsd is a ls command with a lot of pretty colours and some other stuff to enrich and enhance the directory listing experience as documented in the manual at https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/lsd.md.
According to the project documentation at https://raw.githubusercontent.com/lsd-rs/lsd/master/README.md, This project is a rewrite of GNU ls with lots of added features like colors, icons, tree-view, more formatting options etc. Furthermore, The project is heavily inspired by the super colorls project while delivering significant performance gains through its compiled Rust implementation (see https://raw.githubusercontent.com/lsd-rs/lsd/master/README.md).
Command-Line Syntax and Output Modes
Executing lsd follows standard Unix argument conventions. As documented at https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/lsd.md, the formal command synopsis is lsd [FLAGS] [OPTIONS] [--] [FILE]... for custom paths and flags:
lsd [FLAGS] [OPTIONS] [--] [FILE]...When users run the utility without arguments, it displays entries in a grid layout with distinct colors for file types. When detailed metadata is needed, the -l option is used to Display extended file metadata as a table per the reference documentation at https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/lsd.md. Users exploring hierarchical structures can supply the --tree flag to Recurse into directories and present the result as a tree directly inside the console window (https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/lsd.md).
Extended File Attributes and Git Integration
In development environments managed by version control, lsd provides direct repository inspection capabilities. Passing the --git parameter instructs the tool to Display git status. Directory git status is a reduction of included file statuses (recursively) according to the manual at https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/lsd.md. This allows software engineers to quickly spot modified, staged, or untracked assets across nested directories without running separate status queries.
Storage analysis is another key capability supported by the CLI flags. Operators can pass the --total-size switch to Display the total size of directories as detailed in https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/lsd.md. This calculates cumulative storage usage recursively across directory hierarchies for rapid disk space auditing.
Installation Prerequisites and Package Setup
To ensure file and directory icons render cleanly without placeholder squares, appropriate typography must be configured in the terminal emulator. The official guide notes that In order for icons to work you need to have a patched font like nerd-font or font-awesome installed on your machine and your terminal needs to be configured to use the patched font of your choosing as outlined at https://raw.githubusercontent.com/lsd-rs/lsd/master/README.md.
For developers compiling directly from source, the README specifies that If you intend to install lsd from source you need to have a working Rust toolchain (obviously) on your machine (https://raw.githubusercontent.com/lsd-rs/lsd/master/README.md). With Cargo installed and available in the system PATH, the installation command published at https://raw.githubusercontent.com/lsd-rs/lsd/master/README.md is:
cargo install lsdConfiguration File and Theme Customization
Default command options can be permanently persisted through a YAML configuration file. As specified in the official template at https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/samples/config-sample.yaml, This specifies the columns and their order when using the long and the tree layout. A typical column block order from https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/samples/config-sample.yaml is:
blocks: - permission - user - group - size - date - nameColor schemes can be tailored beyond terminal palette defaults. As documented in https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/samples/config-sample.yaml, When custom is set, lsd will look in the config directory for colors.yaml. In multi-user setups or automated script environments, developers can specify --config-file <path> to Provide the config file from a custom location as detailed at https://raw.githubusercontent.com/lsd-rs/lsd/main/doc/lsd.md.
Release Verification and Project Licensing
The lsd codebase maintains an active release cadence with regular bug fixes. For example, the tagged release v1.2.0 at https://github.com/lsd-rs/lsd/releases/tag/v1.2.0 resolves an edge case: fix total size loop when using with -a by @zwpaper in #1097.
The software is published under the terms of the Apache License Version 2.0, January 2004 as verified in the official license declaration at https://raw.githubusercontent.com/lsd-rs/lsd/master/LICENSE. This permissive license provides organizations and developers the freedom to run, modify, embed, and redistribute lsd in both open-source and commercial environments.
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.