ranger(1)
A terminal file manager with VI key bindings and a column view showing file hierarchy and preview pane.
Synopsis
ranger [OPTION]... [PATH]...Description
Ranger is a console-based file manager with a minimalist design and powerful features. It displays a three-column view: directories on the left, current folder in the middle, and previews on the right. Navigate using VI-style keybindings (hjkl for movement) or arrow keys, and execute commands with a colon prompt similar to Vim.
The file manager is highly customizable through configuration files in ~/.config/ranger/. It supports image thumbnails, syntax-highlighted file previews, bookmarks, and custom commands. Ranger can open files with associated applications or run shell commands directly.
Common options
| Flag | What it does |
|---|---|
--list-tagged-files FILE | List all tagged files to FILE, one per line |
--profile | Print execution time of ranger startup phases |
--clear-caches | Remove cached directory information and exit |
--copy-config TYPE | Copy default config files to ~/.config/ranger (TYPE: scope, rifle, rc, all) |
--choosedir FILE | Exit with selected directory path written to FILE |
--choosefile FILE | Exit with selected file path written to FILE |
--cmd COMMAND | Execute a ranger command before entering the interactive mode |
--fail-unless-cd | Exit with error if directory cannot be entered |
-r | Show last directory using RANGER_PREVDIR environment variable |
Examples
Start ranger in the current directory with default settings
rangerOpen ranger directly in the documents directory
ranger /home/user/documentsUse ranger to select a directory, then change to it in the current shell
ranger --choosedir /tmp/dir && cd "$(cat /tmp/dir)"Copy all default configuration files to ~/.config/ranger/ for customization
ranger --copy-config allStart ranger in /path with a search command already executing
ranger --cmd 'search filename' /pathProfile ranger startup performance to see initialization timing
ranger --profile 2>&1 | tail