If you spend real time in a terminal, cd is the command you type more than almost anything else. And most of the time it's the same handful of paths, spelled out in full, every single day. A smarter way to navigate exists: zoxide, a Rust tool with a single job — replace the habit of typing long cd paths with short jumps.
zoxide calls itself "a smarter cd command," and it's inspired by two earlier tools, z and autojump. It's written in Rust by Ajeet D'Souza, licensed MIT, and at the time of writing the latest stable release is 0.10.0. The idea is simple: zoxide remembers which directories you visit, ranks them by how often and how recently you use them, and lets you "jump" straight to any of them in a few keystrokes. It works on all the major shells — bash, zsh, fish, and more — so setup matches whatever you already use.
How it learns
zoxide scores directories as you move around. By default it hooks into pwd, so every time you cd into a folder, that directory's score climbs. Over time the ranking reflects your actual habits — the directories you return to daily outrank the ones you visited once. That's the whole trick, but it's a remarkably effective one.
Using it day to day
Once zoxide has seen a directory, jumping is just a fragment:
z foo # cd into the highest-ranked directory matching "foo"
z foo bar # match a directory containing both "foo" and "bar"
z .. # up one level
z - # back to the previous directory
z ~/foo # plain paths behave like regular cd
So instead of typing cd ~/projects/blog every morning, you type z blog. When several directories share a name — say, multiple blog folders — z blog client narrows the match down to the right one, or you can go interactive with zi foo, which opens a fuzzy picker via fzf when it's installed. For completions, z foo<TAB> shows interactive choices (bash 4.4+, fish, and zsh).
Getting set up
Install is a one-liner on most systems:
brew install zoxide # Linux / macOS (Linuxbrew)
cargo install zoxide --locked
sudo pacman -S zoxide # Arch
sudo dnf install zoxide # Fedora
apk add zoxide # Alpine
winget install ajeetdsouza.zoxide # Windows
One caveat: on Ubuntu/Debian, skip the apt package — the README strikes it out as outdated and not working. Use one of the options above instead.
Finally, wire the shell hook into your config. For bash or zsh, add a line to the end of ~/.bashrc or ~/.zshrc:
eval "$(zoxide init bash)" # use `zoxide init zsh` for zsh
Fish users add this to ~/.config/fish/config.fish:
zoxide init fish | source
Restart your shell, and you're set. Give it a day or two of normal work and the muscle memory locks in — after that, the full path feels like a waste of keystrokes. zoxide is one of those small tools with an outsized payoff: a faster terminal that still feels exactly like home.
