---
title: "How to use zoxide"
url: https://daily.dev/posts/how-to-use-zoxide-9qarfnek6
source_url: https://flaviocopes.com/zoxide
type: article
source: "Flavio Copes"
published: 2026-08-24T13:22:39.150Z
updated: 2026-08-24T13:23:00.440Z
tags: ["cli", "shell", "bash"]
reading_time: 5
upvotes: 8
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to use zoxide

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 5 min read · 8 upvotes · 0 comments

## Summary

A practical guide to zoxide, a smarter cd replacement that learns frequently visited directories and lets you jump to them with partial path names. Covers installation on macOS, Linux/WSL, and Windows, shell setup for Zsh, Bash, Fish, and PowerShell, using the z and zi commands, inspecting and editing the frecency database, excluding directories, and when to prefer zoxide over plain cd.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/zoxide>

## Questions this post answers

### How do I set up zoxide in Zsh so I can jump between directories with the z command?

Add eval "$(zoxide init zsh)" to the end of ~/.zshrc, then open a new terminal or run source ~/.zshrc. This initialization line creates the z and zi commands and teaches zoxide to track directories as you visit them with cd. Similar lines exist for Bash (~/.bashrc), Fish (zoxide init fish | source), and PowerShell.

_daily.dev surfaces setup guides like this for developers streamlining their terminal workflow._

### How does zoxide decide which directory to jump to when multiple directories match?

Zoxide ranks directories using frecency, a combination of frequency and recency: every directory starts with a score that increases on each visit, and recent visits count more than older ones when choosing between matches. This means a directory used daily will outrank an old one with a similar name. If it still picks the wrong path, add more search terms or use the interactive zi command.

_understanding ranking logic like frecency helps developers pick the right cli tool on daily.dev._

### Should I use zoxide inside shell scripts instead of explicit paths?

No, zoxide should not be used inside shell scripts because its directory matching depends on one person's usage history, so a script's behavior would become unpredictable across machines or users. It is best suited for interactive terminal work, especially when navigating between many projects daily, while scripts should always reference explicit paths.

_developers weighing tool tradeoffs for scripting versus interactive use can track guidance like this on daily.dev._

## Similar posts on daily.dev

- [Zoxide changed the way I navigate folders on Windows, and File Explorer feels broken now](https://daily.dev/posts/zoxide-changed-the-way-i-navigate-folders-on-windows-and-file-explorer-feels-broken-now-lbnbbjy8p) · XDA Developers · 0 upvotes · 0 comments
- [A terminal setup for the modern developer \(2026 edition\)](https://daily.dev/posts/a-terminal-setup-for-the-modern-developer-2026-edition--2qlwadrc7) · FREEK.DEV · 5 upvotes · 2 comments

---

Tags: [#cli](https://daily.dev/tags/cli), [#shell](https://daily.dev/tags/shell), [#bash](https://daily.dev/tags/bash)

[View this post on daily.dev](https://daily.dev/posts/how-to-use-zoxide-9qarfnek6)
