Need a Command Line-based File Manager for Linux?
Audience
This short article is intended for Linux users who are both familiar with the command line and a terminal-based text editor called vim.
For blind users, I don't believe the ranger
program is accessible for screen readers. Probably not even in VoiceOver for Mac. For file management tasks, if only the
Mac's Finder could support SSH's Secure Copy Protocol (scp
for short) or SSHFS (Secure Sheel File System). Third-party applications will have to be installed.
I do have brew
installed for installing homebrew applications tAhat run Linux-like applications in a Mac, but Brew does not support Mac OS 13 (pre-release). I think
the problem with ranger is that VoiceOver for Mac does not read the currently highlighted directory or file that I currently select.
Keyboard Commands for ranger
:
- Key:
h
,j
,k
,l
- Left, down, up, and right. Basic commands similar to Vim and Vi. You can also use arrow keys if you want to! Arrow keys work in Vim as well.
- Key:
yy
andpp
- Copy and paste a file or directory.
- Key:
gg
- Go to the beginning of the list of files or directories (typing
g
once instead of twice opens the list of available commands; typeg
again and it should move the selector to the top of the list). - Key:
G
- Go to the end of the list of files or directories.
- Key:
Enter
- Depending on the file associations, opening an HTML file opens
w3m
and opening a JSON file opens a text editor such as Vim. - Key:
F4
(function key) - Opens a text editor for a selected file.
- Key:
r
Open with:
(Type the name of the program you want to open with.)- Key:
spacebar
- Select multiple files or directories. This is useful when copying files or directories in bulk.
- Key:
q
- Quit
ranger
. - Command:
:search <filename>
- Searches for a file. Replace
<filename<
with the name of the file you are looking for.
Additional details for ranger can be found by visiting the ArchWiki page.
Install ranger
:
For Fedora/Red Hat-based Linux distributions:
sudo dnf install ranger
Replace dnf
with yum
if you are running an older version of Red Hat-based Linux distribution.
For Debian/Ubuntu-based Linux distributions:
sudo apt install ranger
For those who use Arch Linux (if you use Arch Linux, I'm going to assume you know the commands for installing and updating packages. Explaining flags for pacman
is beyond
the scope of my article.):
sudo pacman -Syu ranger
Why choose ranger
as a terminal-based file manager?
I need a way to copy and paste files into multiple directories. I can do it via the command line, but I can be very lazy with typing the names of directories. With a new flat-file CMS
(Content Management System), I had a new blog setup and I needed to import all of my posts from ClassicPress to my new CMS. For creating new posts, I follow the convention where the
date comes first before the permalink (yyyymmdd-hhmm-permalink
). The following list shows how I break it down.
yyyy
- Year: 2023
mm
- Month: 02 (February)
hhmm
- Hour/Minute: 11:00 (Eastern Time)
permalink
- Permalink:
need-filemanager-linux
The more I use ranger
, the more I begin to fall in love with the program. But if I'm going to be using a screen reader with the screen turned off, this can be a problem
for me and even a problem for blind users as well. However, at least ranger
saved me from having to type a lot, especially when performing file management tasks. If you
are looking for a file management program while working over a secure shell (SSH), give ranger
a try. Oh, and the more I discover keyboard commands, the more I add to the
list of commands. And of course, the more I enjoy using ranger
.
Article published: 2023-02-19 11:15
Categories: The World of Computers, Computers,