# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, scoop 安装 mosh

查看 mosh 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:mosh
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mosh
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mosh
```

  证据: MacPorts ports tree: net/mosh/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add mosh
```

  证据: Alpine Linux edge package indexes: mosh from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install mosh
```

  证据: Debian stable package indexes: mosh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install mosh
```

  证据: Fedora Rawhide package metadata: mosh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#mosh
```

  证据: nixpkgs package indexes: pkgs/by-name/mo/mosh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S mosh
```

  证据: Arch Linux sync databases: mosh from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install mosh
```

  证据: openSUSE Tumbleweed package metadata: mosh from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/mosh-client
```

  证据: Scoop official bucket manifest trees: bucket/mosh-client.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:mosh
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mosh>
- **版本:** 1.4.0
- **来源摘要:** Remote terminal application
- **主页:** <https://mosh.org>
- **仓库:** <https://github.com/mobile-shell/mosh>
- **上游文档:** <https://mosh.org>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://github.com/mobile-shell/mosh/releases/download/mosh-1.4.0/mosh-1.4.0.tar.gz>
- **最后更新:** 2026-06-20T05:07:43Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- mosh (cli)
- mosh-client (cli)
- mosh-server (cli)
- mosh (别名)
- mosh-client (别名)
- mosh-server (别名)

## 依赖

- protobuf

## 构建依赖

- pkgconf
- tmux

## macOS 提供的库

- ncurses

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.4.0
- 管理器更新时间: 2026-06-20
- 本地数据: OK
- 上游仓库: https://github.com/mobile-shell/mosh
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

Mosh, the mobile shell, originated at MIT CSAIL as research by Keith Winstein and Hari Balakrishnan and was presented at USENIX ATC 2012. The paper framed it as a remote terminal application for intermittent connectivity, roaming between networks, and speculative local echo over high-latency paths. Its core technical contribution was the State Synchronization Protocol, a UDP-based protocol for synchronizing client and server terminal state even when the client's IP address changes.

### 项目历史

The 2012 evaluation reported real-world keystroke traces from six users and found that Mosh could immediately display the effects of 70 percent of keystrokes; over a commercial EV-DO network, median keystroke response latency was under 5 ms compared with 503 ms for SSH. The USENIX page also records more than 15,000 downloads in the first week after release, making Mosh one of the better-known examples of systems research packaged as a practical Unix tool.

### 使用方式

In everyday use, mosh looks like ssh at the command line but uses SSH only to authenticate and start mosh-server on the remote host. After the bootstrap, the terminal session moves to UDP, usually on a high port in the 60000-61000 range. It is packaged broadly across Unix-like systems because its main audience is shell users who work from laptops, unstable Wi-Fi, cellular links, or roaming networks and want terminal sessions to survive connectivity changes.

### 来源

- <https://formulae.brew.sh/formula/mosh>
- <https://github.com/mobile-shell/mosh>
- <https://mosh.org/>
- <https://www.usenix.org/conference/atc12/technical-sessions/presentation/winstein>


## 安全说明

broad file, network, media, or database tool signal. generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- broad file, network, media, or database tool signal
- generalized runtime or code generation signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mosh
- **Version Scheme:** 0
- **Revision:** 40
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Debian apt - mosh - 1.4.0-1+b2: normalized package name match | Debian stable package indexes: mosh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Mobile shell that supports roaming and intelligent local echo | https://mosh.org
- Nix - mosh: normalized package name match | nixpkgs package indexes: pkgs/by-name/mo/mosh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - mosh - 1.4.0-1ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: mosh from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Mobile shell that supports roaming and intelligent local echo | https://mosh.org
- apk - mosh - 1.4.0-r19: normalized package name match | Alpine Linux edge package indexes: mosh from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Mobile shell surviving disconnects with local echo and line editing | https://mosh.org
- apk - mosh-bash-completion - 1.4.0-r19: normalized package name match | Alpine Linux edge package indexes: mosh-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Bash completions for mosh | https://mosh.org
- apk - mosh-client - 1.4.0-r19: normalized package name match | Alpine Linux edge package indexes: mosh-client from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Mosh client | https://mosh.org
- apk - mosh-client-doc - 1.4.0-r19: normalized package name match | Alpine Linux edge package indexes: mosh-client-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Mosh client (documentation) | https://mosh.org
- apk - mosh-doc - 1.4.0-r19: normalized package name match | Alpine Linux edge package indexes: mosh-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Mobile shell surviving disconnects with local echo and line editing (documentation) | https://mosh.org
- apk - mosh-nftrules - 1.4.0-r19: normalized package name match | Alpine Linux edge package indexes: mosh-nftrules from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Mobile shell surviving disconnects with local echo and line editing (nftables ruleset) | https://mosh.org
- apk - mosh-server - 1.4.0-r19: normalized package name match | Alpine Linux edge package indexes: mosh-server from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Mosh server | https://mosh.org
- apk - mosh-server-doc - 1.4.0-r19: normalized package name match | Alpine Linux edge package indexes: mosh-server-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Mosh server (documentation) | https://mosh.org
- dnf - mosh - 1.4.0-13.fc45: normalized package name match | Fedora Rawhide package metadata: mosh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Mobile shell that supports roaming and intelligent local echo | https://mosh.mit.edu/
- pacman - mosh - 1.4.0-32: normalized package name match | Arch Linux sync databases: mosh from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Mobile shell, surviving disconnects with local echo and line editing | https://mosh.org/
- zypper - mosh - 1.4.0-5.19: normalized package name match | openSUSE Tumbleweed package metadata: mosh from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | The mobile shell | https://mosh.org/
- MacPorts - mosh: normalized package name match | MacPorts ports tree: net/mosh/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/mosh-client: installed executable or alias match | Scoop official bucket manifest trees: bucket/mosh-client.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [protobuf](https://pkg.so/zh-hans/brew/protobuf/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [tmux](https://pkg.so/zh-hans/brew/tmux/) - Build dependency declared by Homebrew.
- [putty](https://pkg.so/zh-hans/brew/putty/) - Shares pkgdb curated category or tags: cli, networking, remote-access, ssh, terminal.
- [shellz](https://pkg.so/zh-hans/brew/shellz/) - Shares pkgdb curated category or tags: cli, networking, remote-access, remote-shell, ssh.
- [pssh](https://pkg.so/zh-hans/brew/pssh/) - Shares pkgdb curated category or tags: cli, networking, remote-access, ssh.
- [mapscii](https://pkg.so/zh-hans/brew/mapscii/) - Shares pkgdb curated category or tags: cli, networking, terminal.
- [mussh](https://pkg.so/zh-hans/brew/mussh/) - Shares pkgdb curated category or tags: cli, networking, remote-access, ssh.
- [trzsz-ssh](https://pkg.so/zh-hans/brew/trzsz-ssh/) - Shares pkgdb curated category or tags: cli, networking, ssh, terminal.
- [felinks](https://pkg.so/zh-hans/brew/felinks/) - Shares pkgdb curated category or tags: cli, networking, terminal.
- [trzsz](https://pkg.so/zh-hans/brew/trzsz/) - Shares pkgdb curated category or tags: cli, networking, ssh, terminal.
- [shellinabox](https://pkg.so/zh-hans/brew/shellinabox/) - Local metadata places this package in an adjacent workflow. Shared terms: access, cli, networking, remote, remote-access.

## Combined YAML source

View the package source record on GitHub. [combined/mosh.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mosh.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
