TiloBox
Back to directory
lsd project preview

lsd

A terminal directory listing command with colors, icons, tree views, Git status, and configurable layouts.

LicenseApache-2.0
GitHub stars16.2k
Last commit2 weeks ago
Tags7 topics
CliFile ListingRustIconsOpen SourceAi ToolsTerminal
Overview

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.

Guided learning

Learn lsd by building

Practical setup notes, real use cases, and copy-ready examples in one focused guide.

4 min read 6 sections
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:

code
1lsd [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:

sh
1cargo install lsd

Configuration 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:

yaml
1blocks:
2 - permission
3 - user
4 - group
5 - size
6 - date
7 - name

Color 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.

lsd FAQs

lsd is listed as a Developer Tools tool on TiloBox. Review the overview, features, and official documentation on this page to decide whether it solves your specific workflow.

Start with the project's GitHub repository for supported installation and deployment instructions. Test the setup with representative data or a small project before rolling it out more widely.

lsd is listed under the Apache-2.0 license. Read the complete license text and the project's notices before using, modifying, or distributing the software.

Production readiness depends on your requirements. Review maintenance activity, security practices, documentation, backup and upgrade procedures, and compatibility with your stack; then validate it in a non-production environment.

lsd is listed as an alternative to ls. Compare the core workflow, deployment model, integrations, and licensing against your must-have requirements before switching.