💾 Archived View for darknesscode.xyz › linux › ranger-filemanager.gmi captured on 2023-03-20 at 17:48:20. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-05)
-=-=-=-=-=-=-
Ranger is a console file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with rifle, a file launcher that is good at automatically finding out which program to use for what file type.
$ sudo apt install ranger #Debian/Ubuntu $ sudo yum install ranger #RHEL/CentOS $ sudo dnf install ranger #Fedora 22+ $ sudo pacman -S ragner #Archlinux
Alternatively, you can also use PIP command to install ranger as shown.
$ sudo pip install ranger-fm
After installing ranger, you can start it from the terminal using following command.
$ ranger
Ranger uses many of the same keybindings as "vim". For instance, the movement commands mirror vim closely:
There are also some directory-specific shortcuts to move to common directories:
Ranger allows you to perform many different operations on files from within its interface. Here are some of the most common:
Type m<key> to bookmark the current directory. You can re-enter this directory by typing **'<key>**. **<key>** can be any letter or digit. Unlike vim, both lowercase and uppercase bookmarks are persistent.
Each time you jump to a bookmark, the special bookmark at key will be set to the last directory. So typing gets you back to where you were before.
Bookmarks are selectable when tabbing in the :cd command.
Note: The bookmarks **'** (Apostrophe) and **`** (Backtick) are the same.
Ranger also incorporates tabbed functionality to allow multiple viewports into the filesystem. Here are the most common tab control keys:
These commands control ranger itself:
Like vim, ranger also includes a robust command interface. This allows you to manipulate files in more complex ways. The abilities are extensive, so we will only be covering a few:
There are a number of flags that you can pass to commands to modify the operation of the commands. They should be used with a dash "-" after typing "!" for shell commands or ":" for ranger commands:
Ranger also allows you to target specific files by substituting groups of files for command operations. It accomplishes that by using placeholders that will be expanded with the correct files upon execution:
For example, if we wanted to change the names of multiple files, we could select them all with the space bar. After that, we can type:
This is a great way to rename multiple files. It gives you every file you'd like to change in a text editor. You simply modify as necessary and then exit out. The file manager will perform your changes when after you confirm.
----------
----------
© DarknessCode