# lsd

> Enhanced ls replacement with colors, icons, tree view, and additional formatting options written in Rust

Stars: 16.3k · Language: Rust · License: Apache-2.0 · Categories: File Management

- Repository: https://github.com/lsd-rs/lsd
- Page: https://www.trmn.sh/tools/lsd

## Install

- Homebrew: `brew install lsd`
- Cargo: `cargo install lsd`
- APT: `apt install lsd`

## Overview

lsd (LSDeluxe) is a rewrite of GNU `ls` that adds visual enhancements and additional functionality for directory listing. Built in Rust, it provides colored output, file type icons, tree view display, and extensive formatting options while maintaining compatibility with standard `ls` command patterns.

The tool requires a patched font like Nerd Font or Font Awesome for icon display and supports comprehensive customization through YAML configuration files. Users can configure colors, icons, and behavior through `config.yaml`, `colors.yaml`, and `icons.yaml` files placed in the XDG config directory. Icon customization supports three override types: name-based (for specific files/directories), extension-based (for file types), and filetype-based (for categories like directories, executables, symlinks).

lsd includes common usage patterns through shell aliases, such as `alias ls='lsd'` for basic replacement, `alias lt='lsd --tree'` for tree view, and `alias lla='lsd -la'` for detailed listing with hidden files. The tool is available across multiple platforms through system package managers and supports both Unicode emojis and Nerd Font glyphs for file type representation.

### Installation

```bash
# via Homebrew
brew install lsd
```

```bash
# via Cargo
cargo install lsd
```

```bash
# via APT
apt install lsd
```

![lsd sample output](https://media.trmn.sh/cached/f8cf44fde252eecba6f209930767b85cb097cbc87266a8684c1c67c6e29423e8.png)

## Alternatives

- [broot](https://www.trmn.sh/tools/broot.md): Interactive file manager and directory navigator with fuzzy search, git integration, and file operations (Rust, 13.1k stars)
- [dust](https://www.trmn.sh/tools/dust.md): A disk usage analyzer that shows directory sizes with visual bars and intelligent tree traversal (Rust, 12.6k stars)
- [Dufs](https://www.trmn.sh/tools/dufs.md): File server with static serving, uploads, search, zip folder download, account-based access control, HTTPS, and WebDAV, usable from a browser or curl. (Rust, 11.0k stars)
- [eza](https://www.trmn.sh/tools/eza.md): Modern replacement for ls with colors, Git integration, tree view, and extended file metadata display. (Rust, 23.7k stars)
- [xplr](https://www.trmn.sh/tools/xplr.md): Terminal-based file explorer with Lua scripting, keyboard controls, and plugin system for command-line integration (Rust, 4.8k stars)

## Guides

- [Swap ls, cat, find and grep for eza, bat, fd and ripgrep](https://www.trmn.sh/guides/modern-unix-replacements): Install eza, bat, fd and ripgrep, learn the side-by-side commands and flag differences, and alias them without breaking your scripts.
- [Modern Replacements for ls](https://www.trmn.sh/replace/ls): Replace ls with eza, lsd, or exa for colors, Git status, tree view and richer long listings. Also covers broot, an interactive tree navigator.
- [Modern Replacements for tree](https://www.trmn.sh/replace/tree): Tools you can run instead of tree: eza, erdtree, lsd and broot compared by tree output, gitignore handling, flags and config.

---

Canonical: https://www.trmn.sh/tools/lsd
