LinuxCommandLibrary

ranger

Manage files from the terminal

TLDR

Launch ranger

$ ranger
copy

Show only directories
$ ranger --show-only-dirs
copy

Change the configuration directory
$ ranger [[-r|--confdir]] [path/to/directory]
copy

Change the data directory
$ ranger --datadir [path/to/directory]
copy

Print CPU usage statistics on exit
$ ranger --profile
copy

SYNOPSIS

ranger [options] [path...]

PARAMETERS

--help, -h
    Display help message and exit.

--version
    Show program's version number and exit.

--select-file=
    Select the specified file at startup.

--choosefile=
    Write the path of the chosen file to filename and exit.

--choosedir=
    Write the path of the chosen directory to dirname and exit.

--debug
    Enable debug mode, showing additional information.

--disable-config
    Do not load any configuration files.

--copy-config={all|rc|rifle|scope|commands|mimetypes}
    Copy default configuration files to the config directory.

--list-tagged-files
    List files that have been tagged by ranger.

DESCRIPTION

ranger is a free and open-source console file manager with a curses-based interface. It features a multi-pane layout, similar to a column browser, providing an overview of the directory hierarchy. Its design emphasizes speed and efficiency, making it a popular choice for users who prefer working in the terminal.

A key characteristic of ranger is its intuitive, VI-inspired key bindings for navigation and file operations. It offers a powerful file preview system that can display images, videos, archives, and text files directly within the terminal (requires external tools). It also supports various file operations like copying, moving, deleting, and creating files and directories, as well as file tagging and custom commands through its Python-based extensibility.

CAVEATS

Performance may degrade in directories containing an extremely large number of files or when previewing very large media files without optimized external previewers. Terminal emulator capabilities and font support can affect the visual rendering of file previews and icons. Extensive customization requires familiarity with Python.

KEY BINDINGS AND EXTENSIBILITY

ranger leverages a VI-like command mode for efficient navigation and manipulation of files, allowing users to perform complex actions with minimal keystrokes. Its functionality is highly extensible through Python plugins and scripts, enabling users to add custom commands, define new file previewers, and integrate with other tools. Configuration files (e.g., rc.conf, rifle.conf, scope.sh) are also written in Python or shell script, offering powerful customization options.

HISTORY

ranger was created by Roman Zimbelmann and first released around 2009. Its development was driven by the desire for a fast, powerful, and keyboard-centric file manager for the command line, inspired by the efficiency of Vim and the visual layout of column browsers. It quickly gained popularity among terminal enthusiasts for its innovative features and customizable nature.

SEE ALSO

ls(1), cd(1), mv(1), cp(1), rm(1), find(1), ln(1), mc(1)

Copied to clipboard