zoxide
A shell directory jumper that ranks previously visited paths and resolves short queries to frequent destinations.
Why consider zoxide?
zoxide is a smarter cd command written in Rust that learns your most frequently used directories to enable instant navigation. It integrates with all major shells and fuzzy finders to streamline daily terminal workflows.
Learn zoxide by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide4 sections
Navigating Directories with zoxide: A Smarter cd Alternative
Changing directories is one of the most frequent activities in command-line environments. Traditional navigation relies on standard cd commands, requiring engineers to type lengthy paths repeatedly throughout the workday. As presented on the zoxide GitHub repository, zoxide is an open-source CLI utility that functions as a smarter cd command supporting all major shells. It keeps track of the folders you visit most often, letting you jump directly to any directory using simple abbreviations.
According to the official zoxide README, zoxide is a smarter cd command inspired by z and autojump that remembers frequently used directories, allowing developers to jump across deep project structures with minimal keystrokes.
How zoxide Ranks and Tracks Directories
Unlike static bookmarks or shell aliases that require manual creation and maintenance, zoxide dynamically builds an internal database of your directory usage patterns. Based on the zoxide man page, zoxide keeps track of the directories you use most frequently, and uses a ranking algorithm to navigate to the best match. This frecency algorithm combines how often a path is visited with how recently it was accessed to prioritize relevant targets.
Every time you change directories in an active shell session, zoxide records the transition and adjusts directory scores accordingly. As explained in the zoxide-add documentation, If the directory is not already in the database, this command creates a new entry for it with a default score of 1, otherwise, it increments the existing score by 1. Older or infrequently visited locations gradually decay in weight, keeping your navigation list accurate over time.
According to the project Cargo.toml specification, zoxide is built in Rust with the 2024 edition and provides a high-performance command-line utility. Because the binary executes in sub-millisecond time, directory tracking introduces zero perceptible latency to shell prompts.
Installing zoxide on Your System
Installing zoxide is straightforward across diverse operating systems and package distributions. As documented in the zoxide installation guide, The recommended way to install zoxide across Linux and WSL environments is via the official install script.
Run the official install script:
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | shAfter downloading the binary, you must configure your shell to load the zoxide hook on startup. According to the zoxide-init manual, To initialize zoxide on Bash, add the initialization command to the end of your config file usually ~/.bashrc. Once evaluated, restarting your shell session activates the quick navigation commands.
eval "$(zoxide init bash)"Common Navigation Workflows and Commands
Common navigation patterns supported by zoxide include:
z foo # cd into highest ranked directory matching fooz foo bar # cd into highest ranked directory matching foo and barz foo / # cd into a subdirectory starting with fooz ~/foo # z also works like a regular cd commandz foo/ # cd into relative pathz .. # cd one level upz - # cd into previous directoryzi foo # cd with interactive selection (using fzf)z foo<SPACE><TAB> # show interactive completions (bash 4.4+/fish/zsh only)History Migration and Ecosystem Integration
For developers transitioning from existing shell tooling or command loggers, zoxide provides built-in import utilities. According to the zoxide v0.10.0 release notes, The zoxide import command supports fetching history and directory entries from atuin. This enables users to seed their jump index instantly from historical terminal sessions without starting from an empty database.
As specified in the zoxide MIT License, zoxide is distributed under the permissive terms of the MIT License. This permissive license ensures developers and system administrators can deploy and adapt the tool freely across personal, enterprise, and containerized development workstations.
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.