CMD Master
Back to Blog
UpdatedArnošt Havelka

What Is zoxide and How Does It Replace cd?

zoxide remembers folders you visit and lets you jump with z plus a short name. See how it differs from cd and try it in the browser.

Start Interactive Lesson
What Is zoxide and How Does It Replace cd?

zoxide is a small tool that remembers which directories you use, then jumps there from a short query. Instead of cd C:\Users\Name\Documents\Projects\Work, you type z work after the folder is in its database. The official zoxide project documents hooks for PowerShell, Bash, Zsh, and other supported shells. Classic cmd.exe needs an extra integration such as Clink with clink-zoxide; zoxide does not install a native cmd hook by itself. This site’s zoxide intro lesson provides the z command directly in the browser.

Try the command

Jump and watch the prompt path change

Build the command
z
queryPart of the directory name you want to go to.
Terminal
C:>z doc

What zoxide does better than cd

cd needs a path you already know. zoxide scores folders by frecency (how often and how recently you visited them). A partial name is enough when that folder is the best match.

It does not replace cd for a brand-new path you have never opened. You still cd (or click) there once so zoxide can learn it. After that, z is the shortcut.

On this learning site, z is already hooked up. On your own machine you install zoxide and add the init line for your shell. Skipping init is why z looks like an unknown command.

Jump to a folder you use often

Type z plus a distinctive piece of the folder name. z doc might land in Documents if that is what you visit most. If two folders match, pick a longer query.

Try the command

Jump with a short name

Build the command
z
Terminal
C:>z doc

To inspect matches without jumping, use query-style commands covered in Zoxide Query. Ranking details are in Zoxide Advanced.

Classic Windows cd is still worth knowing: Navigate with CD.

Common mistake

Installing the binary but never initializing the shell. Until the hook runs, z is not a command. The other frequent miss is expecting z brand-new-folder to work before you have ever entered that path.

FAQ

What is zoxide used for? Jumping to directories you already visit, using a short name instead of the full path.

How is zoxide different from cd? cd needs the path. z uses a learned database of folders.

How do I install zoxide? Use the installer for your OS from the zoxide project, then add the init snippet to your shell profile.

How do I make z work in my shell? The init line must run when the shell starts. Without it, z is unknown.

Can I jump by a partial name? Yes, if that folder is the best frecency match.

Knowledge Check

1 / 2

What command does zoxide replace for everyday jumps?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Zoxide Deep Dive

Understanding the 'Frecency' algorithm.