# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.4.0
- **来源摘要:** Remote terminal application
- **主页:** <https://mosh.org>
- **仓库:** <https://github.com/mobile-shell/mosh>
- **最后更新:** 2026-06-20T05:07:43Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.4.0
## 项目历史与用法

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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
