yazi Cheatsheet
0.4The terminal file manager that flies
Essential keyboard shortcuts for the yazi terminal file manager
Official docs →Last updated: 2026-03-29
If you've been using ranger or lf to navigate files in the terminal, yazi is the upgrade you didn't know you needed. Written in Rust (because of course it is), yazi is a terminal file manager that's fast enough to make you forget you're not using a native app. We're talking async I/O everywhere — directory loading, file previews, image rendering — nothing blocks the UI. Ever.
What sets yazi apart from ranger? Speed, mostly. Ranger is Python-based and starts to choke on large directories. lf is snappier but minimal to a fault — you end up configuring everything yourself. Yazi hits the sweet spot: batteries-included with built-in image preview (yes, in the terminal via Kitty/iTerm2/Sixel protocols), bulk rename, a plugin system powered by Lua, and first-class integration with tools like fzf, fd, and ripgrep. It uses the same vim-style h/j/k/l navigation you already know, so the muscle memory transfers instantly.
The three-pane Miller columns layout shows parent directory, current directory, and a live preview of whatever you've selected — code with syntax highlighting, images rendered inline, archives listed out. Tab support means you can juggle multiple directories without spawning extra terminal panes. And the visual selection mode lets you cherry-pick files across directories before applying bulk operations. Think of it as your filesystem's power-user cockpit.
Tips
Use Q (capital) instead of q to quit — it prints the current directory path so your shell can cd into it. Pair it with a shell alias like function y() { local tmp; tmp=$(yazi "$@" --cwd-file=/dev/stdout); [ -n "$tmp" ] && cd "$tmp"; } to seamlessly land where you left off.
Yazi has zoxide baked in. Press z to fuzzy-jump to any directory you've visited before without leaving the file manager. It's like cd with a photographic memory.
Pressing a to create files? End the name with / to create a directory instead. Type src/components/ and yazi creates the full nested path. No mkdir -p required.
You can select files across multiple directories. Select some files in one directory, navigate to another, select more, then p to paste them all into your target. Yazi remembers your selections across navigation.
Use S (capital) to search file contents with ripgrep directly inside yazi. It's like having rg --files-with-matches wired into your file manager — select a match and jump straight to it.
Bulk rename is incredibly powerful: select files, then use the r key on a multi-selection to open them in your $EDITOR as a list. Edit the filenames however you want — regex, find/replace, whatever your editor supports — and save. Yazi applies all the renames at once.
Set $YAZI_FILE_ONE to use a custom file(1) database for MIME detection if your previews aren't working as expected. Yazi relies heavily on accurate MIME types to pick the right previewer.