1080*80 ad

Top 13 Free and Open Source Alternatives to ls

Beyond ls: The Best Modern Alternatives for Listing Files

For anyone who spends time in a command-line terminal, the ls command is as fundamental as breathing. It’s reliable, fast, and ubiquitous. But as software development and system administration have evolved, so have the demands we place on our tools. The classic ls output, while functional, often leaves us wanting more context—like Git status, file-specific icons, or a clearer hierarchical view.

Fortunately, the open-source community has developed a host of powerful, modern alternatives that supercharge this basic task. These tools aren’t just about adding color; they’re about providing more information in a smarter, more readable format, ultimately boosting your productivity. If you’re ready to upgrade your terminal experience, here are some of the best ls alternatives you should try today.


1. eza: The Powerful, All-in-One Successor

Formerly known as exa, eza has become the gold standard for modern file listing. Written in Rust, it’s designed to be a fast, feature-rich replacement that is both beautiful and practical. It improves on ls in nearly every way, offering better defaults and a wealth of new features.

  • Key Features:
    • Superior Color Coding: eza uses colors to distinguish between file types, permissions, and metadata, making output instantly scannable.
    • Built-in Tree View: You can easily display directory structures with the --tree flag, replacing the need for a separate tree utility.
    • Git Integration: See the Git status of every file and directory right in the listing—new, modified, or staged—without running another command.
    • Icon Support: With a Nerd Font installed, eza can display icons next to files and folders, providing quick visual cues for file types.
    • Highly Customizable: You can control everything from the colors to the columns displayed.

eza is the perfect drop-in replacement for anyone who wants a significant upgrade with minimal configuration.

2. lsd (LSDeluxe): A Feast for the Eyes

If aesthetics are high on your priority list, lsd is for you. As its name suggests, this ls clone is built with a focus on delivering a visually pleasing experience. Also written in Rust, it’s fast and packed with features designed to make your terminal look amazing.

  • Key Features:
    • Awesome Icon Support: lsd is renowned for its excellent out-of-the-box icon support, which is arguably its main draw.
    • Customizable Color Themes: Comes with built-in themes and allows you to create your own, tailoring the look and feel to your exact preferences.
    • Configurable Layouts: You can switch between different layouts, including a grid view and a classic list view.
    • Built-in Tree View: Like eza, lsd includes a beautiful tree view complete with icons and Git status indicators.

Choose lsd if you want a file lister that is as beautiful as it is functional.

3. broot: The Interactive Directory Navigator

broot takes a different approach. It’s not just a command to list files; it’s an interactive tool for navigating and managing your filesystem. When you run br, it provides a comprehensive overview of a directory that you can filter, search, and act upon without leaving the interface.

  • Key Features:
    • Interactive Filtering: Start typing to instantly filter the directory view and find exactly what you’re looking for.
    • Disk Usage Visualization: broot can show you the relative size of files and folders, helping you quickly identify what’s taking up space.
    • File Management: You can move, copy, or delete files and directories directly from the broot interface.
    • Command Integration: Easily open a file in your default editor or run any other shell command on a selected file.

broot is more than an ls alternative; it’s a powerful file manager for your terminal, perfect for complex directory exploration.

4. fd: The Fast and Friendly File Finder

While fd is technically a modern alternative to the find command, it deserves a mention here because it solves a related problem: locating files. It is incredibly fast and offers a much more intuitive syntax than find. It’s the perfect companion tool for any modern command-line user.

  • Key Features:
    • Extremely Fast: fd is built for speed, often outperforming find by a significant margin.
    • Sensible Defaults: By default, it ignores hidden directories, files listed in your .gitignore, and binary files, giving you only the relevant results.
    • Simple Syntax: Instead of complex syntax, you just use fd <pattern>. For example, fd 'package.json' will quickly search for that file in the current directory and its subdirectories.
    • Regular Expression Support: It supports regular expressions for more advanced search patterns.

Pair fd with eza or lsd for a complete, modern file navigation and discovery workflow.

How to Make the Switch: A Quick Tip

Adopting one of these tools is easier than you think. Most are available through common package managers like Homebrew (macOS), apt (Debian/Ubuntu), or dnf (Fedora). For example, to install eza on macOS, you’d run:

brew install eza

The real magic happens when you create an alias. By aliasing ls to your new tool, you can start using it immediately without changing your muscle memory. Add the following line to your shell configuration file (like .zshrc, .bashrc, or config.fish):

# Example alias for eza with common flags
alias ls='eza --icons --git -l'

# You can also alias other commands
alias ll='eza --icons --git -l'
alias lt='eza --icons --git --tree'

After reloading your shell, typing ls will now execute your new, supercharged command.

Final Thoughts

While the humble ls command will always have a place in our toolkits, it no longer has to be our default. Modern alternatives like eza and lsd offer vastly improved readability and contextual information that can genuinely speed up your workflow. For more complex tasks, tools like broot provide interactive management capabilities that feel like a superpower.

Take a few minutes to install one of these alternatives and set up an alias. It’s a small change that delivers a significant and immediate improvement to your daily command-line experience.

Source: https://www.linuxlinks.com/best-replacements-ls/

900*80 ad

      1080*80 ad