Ranger is a simple yet powerful terminal file manager for Linux. It works by using the ncurses library and a custom file launcher script to create a beautiful and seamless interface that you can use to access any file on your machine.
Download this Cheatsheet
Enter your email below to receive this PDF cheatsheet in your Inbox.
One of the notable features of Ranger is that it allows you to navigate and manipulate files using only your keyboard. To achieve this, Ranger adopts the familiar Vi shortcut layout. This makes the program easier to get a hold of if you are already familiar with Vi and Vim for text editing.
This cheatsheet will show you some of the most common keybindings for the Ranger File Manager. It will also highlight some of the program’s little-known tools and options that you can use to go through your data efficiently.
Shortcut | Function |
---|---|
Buffer Movement | |
J | Go one entry down on the current directory. |
K | Go one entry up on the current directory. |
Shift + J | Move the selection cursor halfway down the directory listing. |
Shift + K | Move the selection cursor halfway up the directory listing. |
GG | Go to the top of the current directory listing. |
Shift + G | Go to the bottom of the current directory listing. |
Shift + H | Go back to the last open directory in the current session. |
Shift + L | Go forward to the most recent open directory in the current session. |
File and Directory Manipulation | |
L | Open the currently selected directory. |
H | Leave the currently open directory. |
Enter | Open the currently selected file. |
R | Open the manual file prompt for the currently selected file. |
Z, then H | Display all the hidden files in the current directory. |
O | Print all the available sorting options for the current directory. |
Y, then Y | Place a copy of the currently selected file into the system clipboard. |
Y, then P | Copy the path of the currently selected file instead of the actual binary. |
Y, then D | Copy the name of the current directory. |
Y, then N | Copy the name of the currently selected file. |
Y, then Period (.) | Copy the file extension of the currently selected file. |
P, then P | Paste the file in the system clipboard to the current directory. |
D, then D | Cut the currently selected file to the system clipboard. |
Equals (=) | Change the permission bits of the currently selected file. |
A | Rename the currently selected file. |
D, then Shift + D | Delete the selected file in the current directory. |
File and Directory Searching | |
Forward Slash (/) | Open the search prompt for Ranger. |
N | Go to the next instance of the current search query. |
Shift + N | Go back to the previous instance of the current search query. |
File and Directory Marking | |
M + A | Create a new marker on the selected file and save it to the “A” register. |
Single Quote Mark (‘) + A | Jump to the location marked on the “A” register. |
U + M, then A | Remove the marker on the “A” register. |
Directory Movement | |
G, then H | Go to the home directory of the current user. |
G, then E | Go to the “/etc” directory. |
G, then U | Go to the “/usr” directory. |
G, then D | Go to the “/dev” directory. |
G, then O | Go to the “/opt” directory. |
G, then V | Go to the “/var” directory. |
G, then Shift + M | Go to the “/mnt” directory. |
G, then P | Go to the “/tmp” directory. |
G, then Forward Slash (/) | Go to the root directory. |
Interface Manipulation | |
G, then N | Create a new tab on the current directory. |
Tab | Switch to the right of the currently open tab. |
Shift + Tab | Switch to the left of the currently open tab. |
Z | Open the Settings pane for Ranger. |
Z, then M | Enable mouse cursor support for the current session. |
R | Refresh the contents of the current directory. |
S | Nest a new terminal window inside the current session. |
Ctrl + L | Redraw the terminal interface. |
Shift + Backtick (`) | Toggle the multi-pane view for the current session. |
Ctrl + C | Cancel the currently running process inside Ranger. |
Q | Exit the current Ranger session. |
Filtering | |
Period (.) + D | Show all the folders in the current directory. |
Period (.) + F | Show all the files in the current directory. |
Period (.) + L | Show all the symbolic links in the current directory. |
Period (.) + Double Quote Mark (“) | Show all the duplicate files and folders in the current directory. |
Period (.) + Single Quote Mark | Show all the unique files and folders in the current directory. |
Period (.) + Bar (|) | Enable the “OR” logic for the currently active filters. |
Period (.) + Ampersand (&) | Enable the “AND” logic for the currently active filters. |
Period (.) + Exclamation Mark (!) | Enable the “NOT” logic for the currently active filters. |
Period (.) + Period (.) | Print all the active filters in the current session. |
Period (.) + C | Remove all the active filters in the current session. |
Task View | |
W | Open Ranger’s task view pane. |
Down Arrow | Move the selection cursor one row down. |
Up Arrow | Move the selection cursor one row up. |
End | Move the selection cursor to the bottom of the pane. |
Home | Move the selection cursor to the top of the pane. |
Q | Close the task view pane. |
Help System | |
Shift + Forward Slash (/) | Print Ranger’s in-client help system. |
Shift + Forward Slash (/), then M | Print the manual page for Ranger. |
Shift + Forward Slash (/), then C | Print the documentation for available Ranger commands. |
Shift + Forward Slash (/), then S | Print a list of the current settings for Ranger. |
Image credit: Unsplash (Background) and Wikimedia Commons (Logo). All alterations and screenshots by Ramces Red.
Our latest tutorials delivered straight to your inbox