Operations 6 min read

Boost Your Remote File Transfers with trzsz – A TMUX‑Compatible Alternative to rz/sz

This guide introduces trzsz, a TMUX‑compatible file‑transfer tool written in Python (and Go/JS variants), explains how to install it on various platforms, details its command‑line options, and shows practical usage examples for uploading and downloading files over SSH.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Boost Your Remote File Transfers with trzsz – A TMUX‑Compatible Alternative to rz/sz

Overview

trzsz (trz/tsz) is a file‑transfer utility written in Python with additional Go and JavaScript implementations. It is compatible with tmux, provides progress bars, supports whole‑directory transfer, and allows drag‑and‑drop uploads. The tool works in terminals such as iTerm2, Tabby, Electerm, and TTYD.

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 trzsz

Debian (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 trzsz

CentOS / Fedora (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 trzsz

macOS (Homebrew)

brew update
brew install trzsz-go

Windows (Scoop)

scoop bucket add extras
scoop install trzsz

Build from source (GitHub)

git clone https://github.com/trzsz/trzsz-go.git
cd trzsz-go
make
sudo make install

Command‑line usage

Uploading files with trz

trz [-h] [-v] [-q] [-y] [-b] [-e] [-d] [-B N] [-t N] [path]

-h : display help and exit

-v : show version and exit

-q : hide progress bar during transfer

-y : overwrite existing files with the same name

-b : binary mode (faster for compressed files, images, media)

-e : escape all known control characters

-d : specify a file or directory to upload/download

-B N : set maximum buffer size (default 10M)

-t N : set timeout in seconds (default 20; 0 or negative disables timeout)

path : destination directory on the remote host (default: current directory)

Running trz without arguments uploads the files in the local working directory to the remote server’s current directory. To upload to a specific directory, provide the path, e.g., trz /opt.

Start a transfer session over SSH: trzsz ssh <em>IP_ADDRESS</em> For directory upload, add the -d flag:

trzsz -d ssh <em>IP_ADDRESS</em>

Downloading files with tsz

tsz [-h] [-v] [-q] [-y] [-b] [-e] [-d] [-B N] [-t N] file [file ...]

file : name of the file to download; supports relative or absolute paths, wildcards, and multiple files

Example:

# tsz file1 file2 file3

References

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/

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

command-linefile transfertmuxtrzsz
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.