AI Crawler · Collection Records

Bot summary · Last 24 hours

zoxide — smart cd

A smart cd that remembers frequently visited directories. Navigate instantly with partial patterns.
Markdown source·Anything to add or correct?

💬 "zoxide command"

zoxide is a smart cd that learns your frequently visited directories. Instead of using complex full paths, you can jump directly to any directory with a short pattern.

It scores directories based on visit frequency and recency to select the most suitable path.

  • Concept: Accelerates directory navigation based on your visit history.
  • z command: Use z instead of cd to navigate using partial patterns.
  • Smart Matching: Prioritizes suggesting paths you visit most often.
  • Shell Integration: Integrates automatically with bash, zsh, and fish.

Installation and Download

Install zoxide using a package manager or a script.

EnvironmentCommand
Ubuntu / Debiansudo apt install zoxide
Fedora / RHELsudo dnf install zoxide
Archsudo pacman -S zoxide
macOS (brew)brew install zoxide
Script Installcurl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.shsh
Binary Downloadgithub.com/ajeetdsouza/zoxide/releases

After installation, add eval "$(zoxide init bash)" to your shell configuration to enable the z command.

Frequently Used Options

OptionDescription
z <pattern>Navigate to a directory matching the pattern
ziSelect a target directory interactively
z -eSearch only directories containing executable files
z -xRemove directories with low visit counts
echo $ZOXIDE_SCORECheck the scoring system

3 Essential Command Combinations

  • z www — Navigate to a directory containing the pattern /www
  • zi — Select a directory from an interactive list
  • z -x rarely-used — Clean up records of infrequently visited directories

💬 "Show me an example of quickly navigating directories using zoxide on a real server."

Here is a step-by-step walkthrough of common scenarios encountered on a production server.

Step 1 · Installation and Initialization

After installation, integrate it into your shell.


sudo apt install -y zoxide && echo 'eval "$(zoxide init bash)"' >> ~/.bashrc && source ~/.bashrc

Step 2 · Memorize Directories

Visit a few frequently used directories several times.


cd /var/www/html && cd /etc/nginx && cd /home/ubuntu

Step 3 · Quick Navigation

Navigate using just a pattern.


z www

Real Execution Output

The result of navigating to a directory using a short pattern after installing zoxide.

!zoxide command execution result

Production server in operation

Practical Usage Examples

1. Switching Between Projects

Scenario — Navigate between multiple projects using short names.


z sks

Result — Instantly navigates to /home/jw/coding/commands/sks.

Key Point — A single short pattern eliminates the need to memorize the entire path.

2. Cleanup

Scenario — Remove infrequently visited directories from records.


z -x old-project

Result — The specified directory is removed from memory.

Key Point — Keeps memory clean, improving matching accuracy.

Real Execution Output

The result of selecting a directory using interactive selection (zi).

!zoxide command execution result 2

Production server in operation

Important Considerations

  • If you do not add zoxide init to your shell configuration, the z command will not be recognized.
  • Visit history is accumulated separately for each server. On shared servers, each user's history is different.
  • If the match is incorrect, you can select directly from the interactive list using zi.
  • It may conflict with existing cd aliases. Check for conflicts in your ~/.bashrc.

Source (HTML): https://games.aidebatehub.com/programs/linux/modern/zoxide.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:31:00+09:00