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

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

## 安装

```sh
sudo av install brew:mg
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mg
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mg
```

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

### Linux

- apk (92%):

```sh
sudo apk add mg
```

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

- Debian apt (92%):

```sh
sudo apt install mg
```

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

- dnf (92%):

```sh
sudo dnf install mg
```

  证据: Fedora Rawhide package metadata: mg 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#mg
```

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

- pacman (92%):

```sh
sudo pacman -S mg
```

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

- zypper (92%):

```sh
sudo zypper install mg
```

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

## 软件包事实

- **软件包键:** brew:mg
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mg>
- **版本:** 7.3
- **来源摘要:** Small Emacs-like editor
- **主页:** <https://github.com/ibara/mg>
- **仓库:** <https://github.com/ibara/mg>
- **许可证:** LicenseRef-Homebrew-public-domain AND ISC AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause
- **源码归档:** <https://github.com/ibara/mg/releases/download/mg-7.3/mg-7.3.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- mg (cli)
- mg (别名)

## macOS 提供的库

- ncurses

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 7.3
- 本地数据: OK
- 上游仓库: https://github.com/ibara/mg
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

mg is the small Emacs-like editor lineage that began as MicroGNUEmacs, itself based on Dave Conroy's MicroEMACS. The troglobit mg history summarizes the origin as a Micro Emacs clone created in 1987 from the 1985 MicroEMACS v30 code, with the old Micro GNU Emacs name dropped after a dispute with the FSF. OpenBSD's mg manual gives the design goal in practical terms: a small, fast, portable editor for people who cannot or do not want to run Emacs, or who are not familiar with vi.

### 项目历史

The package distributed by Homebrew through ibara/mg is a portable version of OpenBSD's mg. Its README says it tracks OpenBSD upstream aggressively, preserving mg's role as a compact, public-domain-ish editor that gives users familiar Emacs key bindings without bringing along GNU Emacs as a large programmable environment.

### 使用方式

Its adoption story is strongest in BSD and Unix packaging. OpenBSD includes mg as a base-system editor; portable builds are packaged by Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, openSUSE, pkgsrc, and other ports collections. In practice it is used as a lightweight `$EDITOR`, for quick system-file edits, rescue or remote environments, and users whose muscle memory is Emacs rather than vi.

### 来源

- <https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/editors/mg/index.html>
- <https://formulae.brew.sh/formula/mg>
- <https://github.com/ibara/mg>
- <https://github.com/troglobit/mg>
- <https://man.openbsd.org/mg>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

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

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

- Debian apt - mg - 20240709-1: normalized package name match | Debian stable package indexes: mg from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | microscopic GNU Emacs-style editor | https://homepage.boetes.org/software/mg/
- Nix - mg: normalized package name match | nixpkgs package indexes: pkgs/by-name/mg/mg/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - mg - 20230501-1: normalized package name match | Ubuntu 24.04 LTS package indexes: mg from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | microscopic GNU Emacs-style editor | https://homepage.boetes.org/software/mg/
- apk - mg - 20260222-r0: normalized package name match | Alpine Linux edge package indexes: mg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | microscopic EMACS style editor | https://github.com/hboetes/mg
- apk - mg-doc - 20260222-r0: normalized package name match | Alpine Linux edge package indexes: mg-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | microscopic EMACS style editor (documentation) | https://github.com/hboetes/mg
- dnf - mg - 20260719-1.fc45: normalized package name match | Fedora Rawhide package metadata: mg from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Tiny Emacs-like editor | https://github.com/hboetes/mg
- pacman - mg - 20260719-1: normalized package name match | Arch Linux sync databases: mg from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Micro GNU/emacs | https://github.com/hboetes/mg
- zypper - mg - 3.7-1.10: normalized package name match | openSUSE Tumbleweed package metadata: mg from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Micro GNU Emacs clone | https://man.troglobit.com/man1/mg.1.html
- MacPorts - mg: normalized package name match | MacPorts ports tree: editors/mg/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [nedit](https://pkg.so/zh-hans/brew/nedit/) - Shares pkgdb curated category or tags: cli, productivity, text-editor, text-editors.
- [ox](https://pkg.so/zh-hans/brew/ox/) - Shares pkgdb curated category or tags: cli, productivity, text-editor, text-editors.
- [ne](https://pkg.so/zh-hans/brew/ne/) - Shares pkgdb curated category or tags: cli, productivity, text-editor, text-editors.
- [moe](https://pkg.so/zh-hans/brew/moe/) - Shares pkgdb curated category or tags: cli, productivity, text-editor, text-editors.
- [aoeui](https://pkg.so/zh-hans/brew/aoeui/) - Shares pkgdb curated category or tags: cli, productivity, text-editor, text-editors.
- [neatvi](https://pkg.so/zh-hans/brew/neatvi/) - Shares pkgdb curated category or tags: cli, productivity, text-editor, text-editors.
- [le](https://pkg.so/zh-hans/brew/le/) - Shares pkgdb curated category or tags: cli, productivity, text-editor, text-editors.
- [fresh-editor](https://pkg.so/zh-hans/brew/fresh-editor/) - Shares pkgdb curated category or tags: cli, productivity, terminal-editor, text-editor.
- [kibi](https://pkg.so/zh-hans/brew/kibi/) - Local package facts share a topical domain. Shared terms: cli, editor, productivity, terminal, text.

## Combined YAML source

View the package source record on GitHub. [combined/mg.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mg.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
