Linux command
zoxide 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Jump to highest ranked directory matching pattern
z [pattern]
Jump to directory matching multiple patterns
z [foo] [bar]
Interactive selection with fzf
zi [pattern]
Add a directory to the database
zoxide add [/path/to/dir]
Remove a directory from the database
zoxide remove [/path/to/dir]
List all entries
zoxide query -l
Show entry scores
zoxide query -ls
Generate shell initialization (add to shell profile)
eval "$(zoxide init [bash|zsh|fish])"
说明
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.
FAQ
What is the zoxide command used for?
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.
How do I run a basic zoxide example?
Run `z [pattern]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more zoxide examples?
This page includes 8 examples for zoxide, plus related commands for nearby Linux tasks.