
⚡️ Jump Smarter, Not Harder: A Beginner’s Guide to zoxide
Written with ChatGPT — my shell sidekick and dotfile demon slayer.
You know what’s exhausting? Typing cd ~/Documents/Projects/Some/Deeply/Nested/Folder for the 47th time in one day. If you’re like me—and I know you are, because you’re reading this—you want your shell life to be slick, fast, and maybe even a little magical.
Enter zoxide: a smarter cd that learns where you go most and lets you teleport there with minimal effort. It’s cd with a memory, a sixth sense, and no nonsense.
Let’s break it down.
🛠️ Installing zoxide
It’s available everywhere good software hangs out.
Debian/Ubuntu:
sudo apt install zoxide
Fedora:sudo dnf install zoxide
Arch Linux:sudo pacman -S zoxide
macOS/Linux (via Homebrew):brew install zoxide
🧬 Shell Setup
You need to hook it into your shell config file so it can override cd (or let you use z instead).
For bash or zsh:eval "$(zoxide init zsh)" # or bash
Add that to ~/.bashrc or ~/.zshrc, then:source ~/.zshrc
For fish:zoxide init fish | source
Then you’re good to go.
🚀 Usage: Become a Directory Wizard
🔍 z <search>z projects
Boom. You’re in ~/Documents/Projects if that’s where you hang out the most. zoxide tracks your most-used directories and gets smarter the more you use it.
💥 zi (Interactive Mode)
If you have fzf installed:zi
This opens a fuzzy menu of all your directories. Pick one. Bam. You’re there.
📂 Replace cd Entirely?
You savage:alias cd='z'
Suddenly, cd is better.
🧠 Bonus Commands
Want to explore the brain of zoxide?zoxide query
This shows you all tracked directories.
Need to clean up something outdated?zoxide remove ~/dead-folder
Good riddance.
🧪 Sample Sessioncd ~/code/linux-kernel/hacks/magicz kernel # Goes back there fast.z code # Could take you to ~/code or ~/Documents/code depending on usage.
It’s based on frecency (frequency + recency). Just like your browser history—but less embarrassing.
📝 TL;DR Cheatsheet
Command What It Does
z foo Jump to a frequently visited dir matching "foo"
zi Open interactive dir picker with fzf
zoxide query List known paths
zoxide remove Remove a directory from history
alias cd='z' Make cd smarter by default
🌱 Final Thoughts
zoxide is one of those tools that, once installed, becomes invisible—but you'll feel it when it’s gone. It makes terminal life feel frictionless, like your shell suddenly understands you.
You want productivity?
You want minimal keystrokes?
You want your shell to read your mind?
You want zoxide.
—
If this helped you, go star zoxide on GitHub and say thanks to @ajeetdsouza for building it. Then come back and tell me what other tools you want me to blog about next. 😎
✌️ & z,
Zack
