Skip to content

Install the CLI

The binary is share2us, and every install also gives you s2u, which is what the rest of these pages use.

Terminal window
curl -fsSL https://share2.us/install.sh | sh

That downloads the prebuilt binary to ~/.local/bin, symlinks s2u, and adds the directory to your PATH. It verifies a checksum before installing anything and falls back to GitHub Releases if the primary download fails.

It then installs the desktop app if this machine has a desktop. On Linux the app lands beside the CLI and gets an entry in your applications list; on macOS it goes to ~/Applications, so nothing here ever needs sudo. A server gets the command line only, and a problem fetching the app is reported as a warning rather than failing the install you asked for.

Environment variables: SHARE2US_INSTALL_DIR (default ~/.local/bin), SHARE2US_VERSION (default latest), and SHARE2US_SKIP_GUI=1 to leave the desktop app out.

A system package, so it upgrades with everything else:

Terminal window
curl -fsSL https://apt.share2.us/share2us-apt.gpg | sudo tee /usr/share/keyrings/share2us-apt.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/share2us-apt.gpg] https://apt.share2.us stable main" | sudo tee /etc/apt/sources.list.d/share2us.list
sudo apt update && sudo apt install s2u

Both amd64 and arm64. Pre-release builds live in the beta suite: write beta main instead of stable main.

Note that apt installs the command line only — there is no desktop app in the package. That is deliberate: apt is the right choice for servers and for machines you keep current with the system, which are mostly machines with no desktop. Use the script above if you want both.

The .deb is also attached to every release if you would rather not add a repository:

Terminal window
sudo apt install ./s2u_<version>_amd64.deb

An apt-installed copy is upgraded by apt. s2u update will tell you so rather than replacing a file the package manager owns.

Terminal window
winget install share2us.cli

Or the one-liner, which installs under %LOCALAPPDATA%\Share2Us\bin and adds it to your PATH:

Terminal window
irm https://share2.us/install.ps1 | iex

Needs Go 1.25 or newer.

Terminal window
git clone https://github.com/share2us/cli
cd cli
go build -o s2u .
sudo mv s2u /usr/local/bin/

go install github.com/share2us/cli@latest works too, but it installs the binary as cli. Rename it afterwards.

The one-liner needs no root and lives in your home directory, which is right for a personal machine, for WSL, and for anywhere you cannot install packages. apt is right for servers and for machines you already keep current.

Use one or the other on a given machine, not both. A copy in ~/.local/bin shadows /usr/bin/s2u, and then you are upgrading one and running the other.

Terminal window
curl -fsSL https://share2.us/uninstall.sh | sh

That removes the binary and the s2u symlink, undoes the PATH edit, and deletes your configuration and credentials. To keep the configuration, append SHARE2US_KEEP_CONFIG=1 sh to the pipe instead.