Ranger | Simple Terminal File Manager for Linux

Ranger is a terminal-based file manager for Linux that gives you a simple way to browse and manage files directly from the command line. You can open folders, view files, move between directories, and manage your data using keyboard shortcuts. Ranger is simple, fast, and easy to use, so you can manage your files easily from the terminal.

What You Can Do with Ranger:

  • Browse files and folders from the terminal.
  • Open files and directories.
  • Move between folders quickly.
  • Copy and move files.
  • Rename and delete files.
  • Search for files.
  • Use keyboard shortcuts.
  • Manage files without a graphical interface.

Ranger Installation Commands

Ranger is available in the Debian-based Linux package repository. You can install it easily using the apt package manager.

First, update the package list:

sudo apt update

Now install Ranger:

sudo apt install ranger -y

After installation, check the installed version:

ranger --version

To start Ranger, run:

ranger

Ranger will open the current directory in the terminal.

Navigation & Shortcuts

Ranger is mainly controlled using the keyboard, you can quickly go up, down, open folders, search files, and exit Ranger using your keyboard.

  • j or ↓ — Move down
  • k or ↑ — Move up
  • h or ← — Go to the parent directory
  • l or → — Open a directory
  • Enter — Open the selected file or directory
  • gg — Go to the top
  • G — Go to the bottom
  • q — Quit Ranger
  • / — Search for a file
  • Esc — Cancel the current search or action

You can use these shortcuts to move around your files without using the mouse.

Ranger Usage Commands

You can use these commands to start Ranger and access its different options. These commands are useful for opening specific folders, checking the version, changing settings, and getting help.

Start Ranger:

ranger

Open a specific directory:

ranger /home/kali/Downloads

Show the Ranger version:

ranger --version

Start Ranger in debug mode:

ranger --debug

Start Ranger with a clean configuration:

ranger --clean

Show the help page:

ranger --help

You can also use:

ranger -h

Set a custom log file:

ranger --logfile=file

Set a custom cache directory:

ranger --cachedir=dir

Set a custom configuration directory:

ranger -r dir

You can also use:

ranger --confdir=dir

Set a custom data directory:

ranger --datadir=dir

Copy the default Ranger configuration:

ranger --copy-config=all

Choose a file and save its path to an output file:

ranger --choosefile=OUTFILE

Choose multiple files:

ranger --choosefiles=OUTFILE

Choose a directory:

ranger --choosedir=OUTFILE

Select a specific file when Ranger starts:

ranger --selectfile=filepath

Show only directories:

ranger --show-only-dirs

List unused keyboard keys:

ranger --list-unused-keys

List tagged files:

ranger --list-tagged-files=tag

Run Ranger with profiling enabled:

ranger --profile

Run a Ranger command when starting:

ranger --cmd=COMMAND

These options give you more control over Ranger and make it easier to use the file manager according to your needs.

Conclusion

Ranger gives you a simple way to browse and manage your files from the terminal. You can quickly open folders, find files, and perform common file tasks using keyboard shortcuts. It is a great choice for simple and fast file management in the terminal.

SHARE THIS POST: