Yahoo
Advertisement
Advertisement
Advertisement
Advertisement

Ditch cd: 3 Powerful Linux Tools to Navigate Directories at Warp Speed

Tux the penguin with a Linux terminal.
Corbin Davenport / GNOME / gg3po

Why type long and tedious paths when you can instantly jump to directories? We're entering the age of quantum computing, yet still navigating terminals like it's the 1970s. Solutions exist today: tools like Zoxide, Warp, and Yazi all make cd obsolete and could save you a lot of time.

Slowly typing out the long and tedious directory paths is error-prone. Back when I was a beginner—on both Windows and Linux—it was torture to type out each individual character, hoping that this time it wouldn't spit out an error. Bookmarks, fuzzy selection, and terminal file managers are how we remedy this issue.

Zoxide: Rapid Navigation with Smart Approximate Matching

A terminal window displays a list of directory paths, with the contents of the selected path shown in a separate pane.

Zoxide is so simple and useful that it's now a mainstay in my personal tool kit. Zoxide works by remembering the directories that you visit and then provides a fuzzy list for you to search over. For example, instead of typing cd, you will type zi. Zoxide then displays a list, and you narrow the candidates down in real time by typing a rough file path. When you select an item, it changes to that directory. Zoxide looks and feels a lot like fzf, if you've used that before, and in fact it relies on fzf for part of its function.

Advertisement
Advertisement

While cd is still necessary sometimes, once you build up a directory history, you can use Zoxide the majority of the time.

Zoxide is available in the repositories for Fedora, Debian, Ubuntu, and Arch Linux. If you require assistance installing software, you can check out our guide on how to install software via the terminal .

Fedora

To install it on Fedora and similar distros:

Debian and Ubuntu

To install it on Debian, Ubuntu, and similar distros:

Arch Linux

To install it on Arch Linux and similar distros:

Manual Installation

If your distro has not packaged Zoxide, you can install it directly from its GitHub releases page:

Always read scripts before executing them like this.

Advertisement
Advertisement

Additionally, you will need to install fzf using your distro's package manager.

Set Up Your Shell

Lastly, no matter how you install Zoxide, to make it work, you need to set up your shell. Place one of the following snippets into your shell configuration file. The following snippets are for Bash and Zsh, but if you visit the installation page, there are steps for additional shells.

If you use Bash:

We also have a guide that explains the bashrc file in detail.

For zsh:

Before you can make any jumps, you need to build up a directory history. Use cd to change into a few directories, then use zi.

Warp Directory: Bookmarks for Your File System

A terminal screen displays the help and a list of bookmark mappings for the Warp Directory command.

Warp directory is a simpler alternative to Zoxide. To use it is straightforward: when you're in a directory that you would like to bookmark, simply type wd add my-alias, and it will save that directory path under that alias. When you want to access that directory, simply use wd my-alias.

Advertisement
Advertisement

For example, to add a directory:

To change to that directory:

Under the hood, Warp Directory simply manages a list of alias-to-path mappings in the .warprc file, which it uses to jump to bookmarked locations. You can view all of your bookmarks with wd list. Over time, this list will contain broken links, and you should use wd cleanto trim it down.

Warp Directory is a Zsh plugin, but there is also a standalone Ruby script. To install the Zsh plugin, visit the wd GitHub page for the installation instructions. For Bash, I created the following script to install everything you need. I've tested it on Debian, Ubuntu, Fedora, and Arch Linux. Copy its contents into a file called install-wd, then run chmod +x install-wdon it to make it executable. Finally, to run it, simply type ./install-wd.

Once the installation is complete, run source ~/.bashrc, and see its help menu with wd -h.

Yazi: Fast, Fluid File System Navigation

A terminal window shows Yazi's three-pane file manager: the left pane lists the parent directory, the middle the current directory, and the right the selected directory.

If you are familiar with Ranger, then Yazi is a modern replacement for it. If you are not familiar with Yazi or Ranger, they are terminal-based (TUI) file managers. It's similar to other well-known applications, like Ranger.

Advertisement
Advertisement

A terminal file manager is a huge upgrade on cd, which is as basic as a command can be. A good terminal file manager makes browsing around your file system rapid—almost as fast as you can think—and Yazi does just that. Those familiar with Vim will feel at home, because Yazi allows you to enter and exit directories with Vim motion keys, which are likely hard-wired deep into your brain stem.

Yazi doesn't only provide rapid navigation; it also provides Zoxide support, which makes jumping around even faster.

Installing Yazi is easy on most distros because it's available in most repositories (but not Debian or Ubuntu).

Arch Linux

To install it on Arch Linux and related distros:

Fedora

To install it on Fedora and related distros, you must use Copr:

Other Distros

If you head over to Yazi's installation page , you will see that there are available packages for most distros. If you're unlucky, and it's not available for your distro, then you can use Snap, Nix, or Homebrew. As a last resort, you can download the binary directly.


I find Warp Directory a little clunkier than Zoxide, but I did use it for years. I now prefer fuzzy find on all the things , and Zoxide does that well. I also used Ranger for years, and it was great, but Yazi has several improvements over it. No matter what terminal file manager that you use, if it enables fast navigation, it's an upgrade over cd.

Advertisement
Advertisement
Mobilize your Website
View Site in Mobile | Classic
Share by: