yazi Cheatsheet

0.4

The terminal file manager that flies

Essential keyboard shortcuts for the yazi terminal file manager

Official docs →
NavigationFile operationsTabs & search

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.

Navigation
h
Go to parent directory
l
Enter directory / open file
j
Move cursor down
k
Move cursor up
J
Seek preview down 5 lines
K
Seek preview up 5 lines
gg
Jump to first file
G
Jump to last file
Enter
Open selected file
Backspace
Go to parent directory (alternative)
~
Jump to home directory
Ctrl+u
Scroll up half page
Ctrl+d
Scroll down half page
File Operations
y
Yank (copy) selected files
x
Yank (cut/move) selected files
p
Paste yanked files into current directory
P
Paste yanked files (overwrite existing)
d
Trash selected files
D
Permanently delete selected files
a
Create new file or directory (append / with trailing slash)
r
Rename selected file
.
Toggle hidden files
z
Jump with zoxide (if installed)
Z
Jump with fzf via zoxide
u
Undo last yank/delete operation
Selection
Space
Toggle selection on current file and move down
v
Enter visual mode (select range)
V
Enter visual unset mode (deselect range)
Ctrl+a
Select all files in current directory
Ctrl+r
Invert selection in current directory
Escape
Cancel selection / exit visual mode
Preview
J
Scroll preview pane down
K
Scroll preview pane up
w
Toggle preview pane on/off
Tabs
t
Create a new tab with current directory
Ctrl+c
Close current tab
1-9
Switch to tab by number
[
Switch to previous tab
]
Switch to next tab
Search & Filter
/
Search by filename (forwards)
?
Search by filename (backwards)
n
Jump to next search match
N
Jump to previous search match
f
Filter files in current directory
s
Interactive search with fd
S
Search file contents with ripgrep
Shell Integration
;
Run a shell command (blocking)
:
Run a shell command (non-blocking/async)
q
Quit yazi
Q
Quit yazi and cd to current directory

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.

Related Tools