ranger

Linux

Changing Directories (cd)

You can quickly jump to common directories using the g (goto) prefix:

  • cd: Opens the console prompt to manually type a path (e.g., :cd /path/to/dir).
  • gh: Jump to Home (~).
  • ge: Jump to /etc.
  • gu: Jump to /usr.
  • gd: Jump to /dev.
  • go: Jump to /opt.
  • gv: Jump to /var.
  • gm: Jump to /media.
  • gM: Jump to /mnt.
  • gp: Jump to /tmp.
  • gr or g/: Jump to the root directory /.

Selection & Marking

  • <Space>: Toggle the mark on the currently selected file.
  • v: Mark or unmark all files in the current directory.
  • uv: Unmark all files.
  • V: Toggle visual selection mode.

Copy, Paste, and Cut

  • yy: Yank (copy) the selected files.
  • ya / yr: Add or remove files from the current copy buffer.
  • dd: Cut the selected files (for moving them).
  • da / dr: Add or remove files from the current cut buffer.
  • pp: Paste the copied or cut files into the current directory.
  • po: Paste and overwrite existing files.
  • pl: Paste files as relative symlinks.
  • pL: Paste files as absolute symlinks.
  • phl: Paste files as hardlinks.

Deleting and Creating Files

  • dD: Opens the console with the delete command to permanently delete selected files.
  • dT: Opens the console with the trash command to move files to the trash.
  • <F7>: Open the console to create a new directory (mkdir).
  • <INSERT>: Open the console to create a new empty file (touch).

Renaming

  • cw: Open the console to rename the current file.
  • a: Append to the current file’s name.
  • A: Rename the file with the cursor positioned at the end.
  • I: Rename the file with the cursor positioned at the beginning.

Tabs

  • <C-n> or gn: Open a new tab.
  • <C-w> or gc: Close the current tab.
  • <TAB> or gt: Move to the next tab.
  • <S-TAB> or gT: Move to the previous tab.
  • <Alt-1> through <Alt-9>: Jump to a specific tab number.

Searching and Filtering

  • /: Open the console to search for a file in the current directory.
  • n: Jump to the next search result.
  • N: Jump to the previous search result.
  • zf: Open the console to filter the directory (hides files that don’t match your query).

Advanced & Toggles

  • zh or <C-h>: Toggle showing hidden files.
  • zp: Toggle file previews.
  • zP: Toggle directory previews.
  • S: Drop into a shell (terminal) in the current directory.
  • : or ;: Open the ranger command console.
  • q: Quit ranger.
  • Q: Quit ranger entirely (closes all tabs).
  • R: Reload the current directory.
  • E: Edit the current file (opens in your default $EDITOR).