Skip to content

Instantly share code, notes, and snippets.

@telnet2
Last active February 9, 2026 18:10
Show Gist options
  • Select an option

  • Save telnet2/2b2b779c9ecc94d531d70998e426e17c to your computer and use it in GitHub Desktop.

Select an option

Save telnet2/2b2b779c9ecc94d531d70998e426e17c to your computer and use it in GitHub Desktop.
remote-setup skill: install zellij, mosh, and fzf

remote-setup

Set up essential CLI tools on a remote machine. Detects the platform and installs zellij, mosh, and fzf using the appropriate method.

Usage

Run this skill on a freshly provisioned remote server to bootstrap the interactive environment.

Instructions

First, detect the platform:

OS="$(uname -s)"
if [ -f /etc/os-release ]; then
  . /etc/os-release
  DISTRO="$ID"
else
  DISTRO="unknown"
fi
echo "OS=$OS DISTRO=$DISTRO"

Then install each tool below according to the detected platform. Each section checks whether the tool is already installed and skips installation if so.


1. zellij

A terminal workspace (multiplexer).

Check

command -v zellij && zellij --version

If zellij is already installed, skip to the next tool.

macOS (Homebrew)

brew install zellij

Linux — Download prebuilt binary

This works on any Linux distribution without needing a package manager entry:

ZELLIJ_VERSION=$(curl -s https://api.github.com/repos/zellij-org/zellij/releases/latest | grep '"tag_name"' | sed 's/.*"v\(.*\)".*/\1/')
curl -fsSL "https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz" -o /tmp/zellij.tar.gz
tar -xzf /tmp/zellij.tar.gz -C /tmp
sudo install /tmp/zellij /usr/local/bin/zellij
rm /tmp/zellij.tar.gz /tmp/zellij

For aarch64 machines, replace the download URL with:

https://github.com/zellij-org/zellij/releases/latest/download/zellij-aarch64-unknown-linux-musl.tar.gz

Alternative — Cargo

If Rust is available:

cargo install --locked zellij

Verify

zellij --version

2. mosh

Mobile shell — a replacement for interactive SSH terminals.

Check

command -v mosh && mosh --version

If mosh is already installed, skip to the next tool.

macOS

brew install mosh

Ubuntu / Debian

sudo apt-get update && sudo apt-get install -y mosh

Fedora

sudo dnf install -y mosh

Arch Linux

sudo pacman -S --noconfirm mosh

Alpine Linux

sudo apk add mosh

openSUSE

sudo zypper install -y mosh

Build from source (any platform)

sudo apt-get install -y build-essential protobuf-compiler libprotobuf-dev libutempter-dev libncurses5-dev zlib1g-dev libssl-dev pkg-config autoconf automake  # Debian/Ubuntu deps
git clone https://github.com/mobile-shell/mosh /tmp/mosh-src
cd /tmp/mosh-src
./autogen.sh
./configure
make
sudo make install
cd - && rm -rf /tmp/mosh-src

Verify

mosh --version

3. fzf

A general-purpose command-line fuzzy finder. Install from GitHub directly.

Check

command -v fzf && fzf --version

If fzf is already installed, skip this section. If you want to update an existing install, see Update below.

All platforms

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all

The --all flag enables key bindings and fuzzy completion without interactive prompts. The install script adds the necessary lines to your shell configuration (~/.bashrc or ~/.zshrc) to set up $PATH and shell integration.

Update

cd ~/.fzf && git pull && ./install --all

Verify

fzf --version

Platform dispatch summary

Tool macOS Ubuntu/Debian Fedora Arch Other Linux
zellij brew install binary from GitHub releases binary from GitHub releases binary from GitHub releases binary from GitHub releases
mosh brew install apt-get install dnf install pacman -S build from source
fzf git clone git clone git clone git clone git clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment