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
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.
Related
10 Linux Commands to Know for Managing Files
These commands are essential when you’re working with files and directories.
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:
sudo dnf install zoxide
Debian and Ubuntu
To install it on Debian, Ubuntu, and similar distros:
sudo apt-get update
sudo apt-get install zoxide
Arch Linux
To install it on Arch Linux and similar distros:
sudo pacman -S zoxide
Manual Installation
If your distro has not packaged Zoxide, you can install it directly from its GitHub releases page:
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh
Always read scripts before executing them like this.
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:
eval “$(zoxide init bash)“
We also have a guide that explains the bashrc file in detail.
For zsh:
eval “$(zoxide init 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
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.
For example, to add a directory:
cd foo
wd add foo
To change to that directory:
wd foo
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 clean to trim it down.
Related
Supercharge Your Command Prompt with Zsh and Oh My Zsh
Teach your boring old Linux or MacOS command prompt new tricks.
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-wd on it to make it executable. Finally, to run it, simply type ./install-wd.
set -e
trap ‘echo “Error @ line $LINENO.”‘ ERR
if command -v apt-get; then
sudo apt-get update &&
sudo apt-get install ruby-full rbenv || true
elif command -v dnf; then
sudo dnf install ruby rbenv || true
elif command -v pacman; then
sudo pacman -S ruby rbenv || true
fi
gem install warp-dir –user-install >/dev/null
RUBY_PCMD=‘$(ruby -r rubygems -e ‘\”puts Gem.user_dir‘\’‘)/bin’
RUBY_PATH=“export PATH=\”$RUBY_PCMD:\$PATH\””
if ! grep -q “$RUBY_PATH“ ~/.bashrc; then
echo “$RUBY_PATH“ >>~/.bashrc
fi
source ~/.bashrc
warp-dir install –dotfile ~/.bashrc >/dev/null
rbenv init >/dev/null || true
echo “Now run ‘source ~/.bashrc'”
Once the installation is complete, run source ~/.bashrc, and see its help menu with wd -h.
Yazi: Fast, Fluid File System Navigation
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.
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:
sudo pacman -S yazi
Fedora
To install it on Fedora and related distros, you must use Copr:
dnf copr enable lihaohong/yazi
sudo dnf install yazi
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.
Related
6 Alternative CLI Tools I Immediately Install on Linux
With a bonus script that puts any search tool to shame.

