# ranger

> Console file manager with VI key bindings, multi-column display, and file preview capabilities

Stars: 17.4k · Language: Python · License: GPL-3.0 · Categories: File Management

- Repository: https://github.com/ranger/ranger
- Website: https://ranger.fm
- Page: https://www.trmn.sh/tools/ranger

## Install

- PyPI: `pip install ranger-fm`
- pipx: `pipx run --spec ranger-fm ranger`

## Overview

Ranger is a terminal-based file manager that uses VI key bindings for navigation and file operations. It displays files in a three-column layout: parent directory, current directory contents, and file preview. Users navigate with h/j/k/l keys or arrow keys, open files with Enter, and quit with q. The interface provides automatic file type detection and launches appropriate programs for different file types through its included `rifle` launcher.

The tool supports extensive file previews through optional dependencies, including ASCII-art image previews via `img2txt`, syntax highlighting for code files using `highlight` or `pygmentize`, and media file thumbnails through `ffmpeg`. It can preview archives, PDFs, HTML pages, and various document formats. Ranger also offers multi-pane viewing modes similar to Midnight Commander for users who prefer that layout.

Ranger includes features like UTF-8 support, file operations (create, copy, delete, chmod), batch file renaming, tabs, bookmarks, and mouse support. It can change the shell's working directory after exit and supports extensive customization through configuration files. The tool is designed for users who prefer keyboard-driven file management and want file preview capabilities without leaving the terminal.

### Installation

```bash
# via PyPI
pip install ranger-fm
```

```bash
# via pipx
pipx run --spec ranger-fm ranger
```

![Ranger three-column interface](https://media.trmn.sh/cached/e3dcdf77d6a6192e0c75cfe18df92ed3dcd2b49a904d372dbb47b64691156c5e.png)

![Two-pane view mode](https://media.trmn.sh/cached/0d2f3c1d0ec715353d8af07070ac3f5dbe4525693f927894ebbe1eeb6ab94794.png)

![Multiple panes view](https://media.trmn.sh/cached/83119acbd92d8258fceef46502b24b3ec1edee81905bc49e8c232a64ae8158b4.png)

## Alternatives

- [beets](https://www.trmn.sh/tools/beets.md): Command-line music library manager that catalogs collections and autocorrects tags using MusicBrainz, Discogs, and Beatport, extensible through Python plugins. (Python, 15.9k stars)
- [ImageMagick](https://www.trmn.sh/tools/imagemagick.md): Open-source C software suite with a command-line interface and APIs for creating, editing, converting, and composing bitmap images in 200+ formats. (C, 17.8k stars)
- [lsd](https://www.trmn.sh/tools/lsd.md): Enhanced ls replacement with colors, icons, tree view, and additional formatting options written in Rust (Rust, 16.3k stars)
- [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)
- [nnn](https://www.trmn.sh/tools/nnn.md): Terminal file manager with disk usage analysis, batch operations, and extensive plugin ecosystem (C, 22.1k stars)

## Guides

- [Best Terminal File Managers](https://www.trmn.sh/best/terminal-file-managers): Compare terminal file managers: yazi, nnn, ranger, lf, broot and more. Differences in previews, plugins, footprint and keybindings.

---

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