# Install dtach with Homebrew, apk, apt, dnf, MacPorts, Nix, zypper

Emulates the detach feature of screen. Version 0.9 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:dtach
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dtach
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dtach
```

  Evidence: MacPorts ports tree: sysutils/dtach/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add dtach
```

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

- Debian apt (92%):

```sh
sudo apt install dtach
```

  Evidence: Debian stable package indexes: dtach from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install dtach
```

  Evidence: Fedora Rawhide package metadata: dtach from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#dtach
```

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

- zypper (92%):

```sh
sudo zypper install dtach
```

  Evidence: openSUSE Tumbleweed package metadata: dtach from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:dtach
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/dtach>
- **Version:** 0.9
- **Source summary:** Emulates the detach feature of screen
- **Homepage:** <https://dtach.sourceforge.net/>
- **Repository:** <https://github.com/crigler/dtach>
- **Upstream docs:** <https://dtach.sourceforge.net/>
- **License:** GPL-2.0-or-later
- **Source archive:** <https://downloads.sourceforge.net/project/dtach/dtach/0.9/dtach-0.9.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- dtach (cli)
- dtach (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.9
- Local data: ok
- Upstream repository: https://dtach.sourceforge.net/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

dtach is a tiny C program that provides the detach-and-reattach part of GNU screen without screen's terminal emulator, window management, or broader feature set. It is a classic Unix package for people who want one behavior, a Unix-domain socket, and almost nothing else.

### Project history

dtach was written by Ned T. Crigler because screen did not fit his needs: he wanted detached terminal sessions without multiple terminal support, terminal emulation, stream interpretation, or a large codebase. The official README says dtach passes the raw output stream through and only processes the detach character and suspend key unless those features are disabled.

The project's official changelog records an initial SourceForge release in version 0.3, portability work in 0.4 for FreeBSD, Debian alpha, Debian SPARC, Debian PowerPC, and Solaris, redraw and process-group changes in later releases, and version 0.9 adding AIX support plus `dtach -N` and `dtach -p` modes.

The SourceForge homepage points to the GitHub repository for development, making the GitHub URL the official HTTP(S) source-control page while SourceForge remains the canonical homepage and release-download surface.

### Adoption history

dtach became a quiet packaging staple because it solves a durable Unix problem with a tiny dependency footprint. The input package metadata records packages across Homebrew, Debian, Ubuntu, Fedora/DNF, Alpine/apk, MacPorts, Nix, and zypper ecosystems, and Homebrew still packages the 0.9 SourceForge tarball.

Its adoption is not about a fast-moving upstream. It is about stability: terminal users, rescue environments, remote shells, and minimal systems can get detach semantics without installing the heavier screen or tmux experience.

### How it is used

Users create or attach to sessions by naming a Unix-domain socket, for example with `dtach -A /tmp/session command`, then detach with the configured detach key and later reattach. Separate attachers can choose different detach characters, suspend handling, and redraw methods.

dtach does not preserve scrollback or screen contents, so it works best with programs that can redraw themselves. The official page calls out full-screen programs such as emacs and ircII as motivating use cases because dtach avoids screen's terminal interpretation layer.

### Why package nerds care

dtach is significant because it is the purest version of a beloved package-manager category: carve one feature out of a larger tool, keep the code tiny, and let users compose it with the rest of Unix. It is the detach feature as a package.

It also remains a useful contrast point for screen, tmux, abduco, dvtm, and terminal multiplexers generally. Package nerds care because dtach marks the boundary between session persistence and full terminal multiplexing.

### Timeline

- 2004: The README copyright line begins, matching the early dtach era.
- Version 0.3: The official changelog records the initial SourceForge release.
- Version 0.4: Portability work adds FreeBSD, Debian alpha, Debian SPARC, Debian PowerPC, and Solaris support.
- Version 0.9: The release adds AIX support, `dtach -N`, `dtach -p`, signal-state preservation, and socket-path fixes.
- 2016: The README copyright line extends through 2016.
- 2026: Homebrew still packages dtach 0.9 from SourceForge.

### Related projects

- GNU screen is the direct comparison and source of the detach feature dtach emulates.
- tmux is the modern terminal multiplexer users often compare with dtach, though dtach intentionally avoids multiplexing features.
- abduco and dvtm occupy nearby minimalist terminal-session territory.

### Sources

- <https://dtach.sourceforge.net/>
- <https://github.com/crigler/dtach>
- <https://raw.githubusercontent.com/crigler/dtach/master/README>
- <https://formulae.brew.sh/api/formula/dtach.json>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - dtach - 0.9-7: normalized package name match | Debian stable package indexes: dtach from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | emulates the detach/attach feature of screen | http://dtach.sourceforge.net/
- Nix - dtach: normalized package name match | nixpkgs package indexes: pkgs/by-name/dt/dtach/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dtach - 0.9-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: dtach from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | emulates the detach/attach feature of screen | http://dtach.sourceforge.net/
- apk - dtach - 0.9-r7: normalized package name match | Alpine Linux edge package indexes: dtach from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A program that emulates the detach feature of screen | https://dtach.sourceforge.net/
- apk - dtach-doc - 0.9-r7: normalized package name match | Alpine Linux edge package indexes: dtach-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A program that emulates the detach feature of screen (documentation) | https://dtach.sourceforge.net/
- dnf - dtach - 0.9-32.fc44: normalized package name match | Fedora Rawhide package metadata: dtach from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A simple program that emulates the detach feature of screen | http://dtach.sourceforge.net
- zypper - dtach - 0.9+2.748020b-3.3: normalized package name match | openSUSE Tumbleweed package metadata: dtach from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Background processes and reattach to them | http://dtach.sourceforge.net/
- MacPorts - dtach: normalized package name match | MacPorts ports tree: sysutils/dtach/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [abduco](https://www.automicvault.com/pkg/brew/abduco/) - Shares av.db curated category or tags: cli, detach, session-management, system, terminal.
- [screen](https://www.automicvault.com/pkg/brew/screen/) - Shares av.db curated category or tags: cli, session-management, system, terminal.
- [cmatrix](https://www.automicvault.com/pkg/brew/cmatrix/) - Shares av.db curated category or tags: cli, system, terminal.
- [cocot](https://www.automicvault.com/pkg/brew/cocot/) - Shares av.db curated category or tags: cli, system, terminal.
- [colortail](https://www.automicvault.com/pkg/brew/colortail/) - Shares av.db curated category or tags: cli, system, terminal.
- [gtop](https://www.automicvault.com/pkg/brew/gtop/) - Shares av.db curated category or tags: cli, system, terminal.
- [hwatch](https://www.automicvault.com/pkg/brew/hwatch/) - Shares av.db curated category or tags: cli, system, terminal.
- [less](https://www.automicvault.com/pkg/brew/less/) - Shares av.db curated category or tags: cli, system, terminal.
- [ov](https://www.automicvault.com/pkg/brew/ov/) - Local package facts share a topical domain. Shared terms: cli, feature, system, terminal.
- [ranger](https://www.automicvault.com/pkg/brew/ranger/) - Local package facts share a topical domain. Shared terms: cli, management, system, terminal.

## Combined YAML source

View the package source record on GitHub. [combined/dtach.yml](https://github.com/automic-vault/db/blob/main/combined/dtach.yml)


## Sources

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