LinuxCommandLibrary

zoxide

Smarter cd command that learns directory habits

TLDR

Jump to highest ranked directory matching pattern

$ z [pattern]
copy
Jump to directory matching multiple patterns
$ z [foo] [bar]
copy
Interactive selection with fzf
$ zi [pattern]
copy
Add a directory to the database
$ zoxide add [/path/to/dir]
copy
Remove a directory from the database
$ zoxide remove [/path/to/dir]
copy
List all entries
$ zoxide query -l
copy
Show entry scores
$ zoxide query -ls
copy

SYNOPSIS

zoxide subcommand [options] [arguments]
z [pattern...]
zi [pattern...]

DESCRIPTION

zoxide is a smarter cd command that learns your habits. It tracks directory visits and uses frecency (frequency + recency) to rank directories, allowing quick navigation with minimal typing.
After shell integration, z foo jumps to the most likely directory containing "foo". Multiple patterns narrow results: z foo bar finds paths with both patterns in order.
The zi command opens fzf for interactive selection when multiple matches exist.
Shell initialization: add eval "$(zoxide init bash)" (or zsh, fish, etc.) to your shell profile.
zoxide is a faster, more modern alternative to autojump and z.sh, written in Rust.

SUBCOMMANDS

add path

Add directory to database
edit
Edit database interactively
import file
Import from autojump/z database
init shell
Generate shell initialization
query [pattern...]
Search database
remove path
Remove directory from database

PARAMETERS (query)

-l, --list

List matches instead of selecting best
-s, --score
Show scores with results
-i, --interactive
Interactive selection (requires fzf)
--exclude path
Exclude path from results

CAVEATS

Requires shell initialization to track directories and provide z/zi commands.
Database needs time to learn your patterns. New installations have limited effectiveness.
Interactive mode requires fzf to be installed.
Different from the z shell plugin but can import its database.

SEE ALSO

cd(1), z(1), autojump(1), fzf(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community