Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
---
id: linux
title: Linux
sidebar_label: Linux
---
Mercury publishes standalone Linux binaries for **x86_64** and **arm64** on glibc-based systems. Alpine/musl, Android/bionic, and 32-bit systems need another installation route; see the [support limits](../installation.mdx#standalone-support-limits).
## Quickest install (recommended)
```bash
curl -fsSL https://mercuryagent.sh/install.sh | sh
```
The installer picks the right binary for your CPU, verifies the SHA-256 checksum, places it at `~/.mercury/bin/mercury`, and adds that directory to your shell `PATH` (`~/.bashrc`, `~/.zshrc`, or `~/.config/fish/config.fish`).
After install:
```bash
exec $SHELL -l
mercury --version
```
:::note Older x86-64 CPUs
The default Linux x64 build uses AVX2. On a CPU without it (Intel before 2013, some VMs) the installer picks the **baseline** build automatically — from `/proc/cpuinfo`, or by switching after an `Illegal instruction` crash. To force it: `curl -fsSL https://mercuryagent.sh/install.sh | MERCURY_ASSET=mercury-linux-x64-baseline sh`.
:::
## Via npm (if you already have Node)
```bash
npm i -g @cosmicstack/mercury-agent
```
Requires **Node.js 22+**. Recommended via [nvm](https://github.com/nvm-sh/nvm) so you avoid `sudo` for global packages.
## Architecture matrix
| CPU | Asset |
|---|---|
| x86_64 | `mercury-linux-x64` |
| aarch64 / arm64 (Raspberry Pi 4/5 64-bit, AWS Graviton, etc.) | `mercury-linux-arm64` |
Check yours:
```bash
uname -m # x86_64 or aarch64
```
There is no prebuilt 32-bit ARM binary. The [npm route](#via-npm-if-you-already-have-node) requires a compatible Node.js 22+ build and dependencies for the device; older boards are not covered by the standard binary releases.
## Pinning a version
```bash
curl -fsSL https://mercuryagent.sh/install.sh | MERCURY_VERSION=1.1.9 sh
```
## System-wide install
```bash
curl -fsSL https://mercuryagent.sh/install.sh | \
sudo MERCURY_INSTALL=/usr/local MERCURY_NO_PATH=1 sh
```
This puts `mercury` at `/usr/local/bin/mercury` (already on most users' PATH).
## Running as a service
To run Mercury as a long-lived daemon under systemd, see the [Daemon Mode → System Service](../../daemon-mode/system-service) guide.
## Headless / SSH usage
Mercury's TUI works fine over SSH. For long sessions, run it inside `tmux` or `screen`:
```bash
tmux new -s mercury
mercury
# detach: Ctrl-b d
# reattach: tmux attach -t mercury
```
## Uninstall
```bash
rm -rf ~/.mercury
# remove the PATH line from your shell rc
```
```bash
npm uninstall -g @cosmicstack/mercury-agent
```
## Next steps
- [Setup](../setup)
- [Daemon Mode](../../daemon-mode/daemon-mode) for 24/7 operation