trzsz: TMUX-Compatible rz/sz Alternative with Progress Bars & Drag-and-Drop Upload
The article introduces trzsz, a Python-based file transfer tool compatible with TMUX that improves upon rz/sz by adding progress bars, directory transfers, drag-and-drop uploads, and support for modern terminals like iTerm2 and Electerm, with installation guides for multiple platforms and usage examples.
Problem: File Transfer in Nested SSH/TMUX Environments
When working through a chain like Laptop → Host 1 → Host 2 → Docker → TMUX, traditional tools like scp and sftp become cumbersome. The classic rz / sz (from lrzsz) are easier but conflict with TMUX.
Solution: trzsz (trz/tsz)
trzsz is a Python-based replacement for lrzsz that works inside TMUX. Key features:
Progress bars during transfer
Directory transfer support ( trz -d, tsz -d)
Drag-and-drop file/folder upload in compatible terminals (iTerm2, Tabby, Electerm, TTYD)
Cross-platform variants: trzsz-go (Go, no terminal dependency) and trzsz-js (Windows cmd/PowerShell)
Installation
Ubuntu (APT)
# sudo apt update && sudo apt install software-properties-common
# sudo add-apt-repository ppa:trzsz/ppa && sudo apt update
# sudo apt install trzszDebian (APT)
# sudo apt install curl gpg
# curl -s 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x7074ce75da7cc691c1ae1a7c7e51d1ad956055ca' \
| gpg --dearmor -o /usr/share/keyrings/trzsz.gpg
# echo 'deb [signed-by=/usr/share/keyrings/trzsz.gpg] https://ppa.launchpadcontent.net/trzsz/ppa/ubuntu jammy main' \
| sudo tee /etc/apt/sources.list.d/trzsz.list
# sudo apt update
# sudo apt install trzszLinux (YUM)
echo '[trzsz]
name=Trzsz Repo
baseurl=https://yum.fury.io/trzsz/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/trzsz.repo
sudo yum install trzszmacOS (Homebrew)
brew update
brew install trzsz-goWindows (Scoop)
scoop bucket add extras
scoop install trzszFrom Source (Go)
git clone https://github.com/trzsz/trzsz-go.git
cd trzsz-go
make
sudo make installUsage
Upload with trz
trz [-h] [-v] [-q] [-y] [-b] [-e] [-d] [-B N] [-t N] [path]Common flags: -h: show help and exit -v: show version and exit -q: hide progress bar -y: overwrite existing files without prompt -b: binary mode (faster for archives, images, media) -e: escape all known control characters -d: upload/download specified file or directory -B N: max buffer size (default 10M) -t N: timeout in seconds (default 20; 0 or negative = no timeout) path: destination directory (default current directory)
Examples:
# trz
# trz /optFor drag-and-drop upload, connect via trzsz ssh IP or trzsz -d ssh IP.
Download with tsz
tsz [-h] [-v] [-q] [-y] [-b] [-e] [-d] [-B N] [-t N] file [file ...]Supports multiple files, relative/absolute paths, and wildcards.
# tsz file1 file2 file3References
trzsz: https://github.com/trzsz/trzsz
trzsz-go: https://github.com/trzsz/trzsz-go
trzsz-js: https://github.com/trzsz/trzsz.js
Chinese documentation: https://trzsz.github.io/cn/
Note: The article includes animated GIFs demonstrating drag-and-drop upload and download; these are omitted here as they cannot be rendered in text.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Linux Tech Enthusiast
Focused on sharing practical Linux technology content, covering Linux fundamentals, applications, tools, as well as databases, operating systems, network security, and other technical knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
