Yazi File Manager Setup
Yazi File Manager Setup
Yazi is a terminal file manager written in Rust. It is fast, keyboard-driven, and works well as a lightweight replacement for opening a full GUI file manager when working inside a terminal or SSH session.
This note records a minimal Linux setup: install the standalone binary and add a shell wrapper so that exiting Yazi can change the current shell directory.
Installation
Download the latest musl build from the official release page:
1 | wget https://github.com/sxyazi/yazi/releases/latest/download/yazi-x86_64-unknown-linux-musl.zip |
Extract it:
1 | unar yazi-x86_64-unknown-linux-musl.zip |
Install both binaries into a directory in $PATH:
1 | sudo mv yazi ya /usr/local/bin/ |
Check that it works:
1 | yazi --version |
Shell Wrapper
By default, a terminal file manager cannot directly change the parent
shell's current directory. Yazi solves this by writing the final
directory to a temporary file. A shell function can read that file after
Yazi exits and then cd there.
Add this function to .bashrc, .zshrc, or
the shell config you use:
1 | function y() { |
Reload the shell configuration:
1 | source ~/.zshrc |
For Bash, use:
1 | source ~/.bashrc |
Now start Yazi with:
1 | y |
When you quit Yazi, the terminal will stay in the directory you were viewing.
Notes
yaziis the file manager itself.yais Yazi's helper command, used for package/plugin management and integrations.- The musl build is convenient because it is mostly self-contained and works on many Linux distributions.
- If
sudo mvfails, make sure/usr/local/binexists and is included in$PATH.
Update
To update, download the latest release again and replace the old
yazi and ya binaries:
1 | wget https://github.com/sxyazi/yazi/releases/latest/download/yazi-x86_64-unknown-linux-musl.zip |