# Install dos2unix with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, scoop, winget, zypper

Convert text between DOS, UNIX, and Mac formats. Version 7.5.6 via Homebrew; verified 2026-06-27.

## Install

```sh
sudo av install brew:dos2unix
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dos2unix
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dos2unix
```

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

### Linux

- apk (92%):

```sh
sudo apk add dos2unix
```

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

- Debian apt (92%):

```sh
sudo apt install dos2unix
```

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

- dnf (92%):

```sh
sudo dnf install dos2unix
```

  Evidence: Fedora Rawhide package metadata: dos2unix 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#dos2unix
```

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

- pacman (92%):

```sh
sudo pacman -S dos2unix
```

  Evidence: Arch Linux sync databases: dos2unix from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install dos2unix
```

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

### Windows

- Chocolatey (92%):

```sh
choco install dos2unix
```

  Evidence: Chocolatey community package catalog: dos2unix from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','dnspy'

- Scoop (92%):

```sh
scoop install main/dos2unix
```

  Evidence: Scoop official bucket manifest trees: bucket/dos2unix.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id waterlan.dos2unix -e
```

  Evidence: Windows Package Manager source index: waterlan.dos2unix from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:dos2unix
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/dos2unix>
- **Version:** 7.5.6
- **Source summary:** Convert text between DOS, UNIX, and Mac formats
- **Homepage:** <https://waterlander.net/dos2unix/>
- **Repository:** <https://git.code.sf.net/p/dos2unix/dos2unix>
- **Upstream docs:** <https://dos2unix.sourceforge.io/dos2unix/man1/dos2unix.htm>
- **License:** BSD-2-Clause
- **Source archive:** <https://waterlander.net/dos2unix/files/dos2unix-7.5.6.tar.gz>
- **Last updated:** 2026-06-27T04:30:36Z
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- dos2unix (cli)
- mac2unix (cli)
- unix2dos (cli)
- unix2mac (cli)
- dos2unix (alias)
- mac2unix (alias)
- unix2dos (alias)
- unix2mac (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 7.5.6
- Package-manager updated: 2026-06-27
- Local data: ok
- Upstream repository: https://waterlander.net/dos2unix/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

dos2unix is the long-running command-line utility family for converting plain-text line endings among DOS/Windows CRLF, Unix LF, and classic Mac CR formats. Its package-nerd appeal is that it solves one of the oldest cross-platform source-tree annoyances with tiny, scriptable tools that became familiar on Unix, Linux, Windows, DOS, Cygwin, and OS/2.

### Project history

The current dos2unix package is an Erwin Waterlander-maintained update of Benjamin Lin's dos2unix and unix2dos implementations. The official history traces the lineage back to John Birchfield's 1989 versions, Benjamin Lin's 1995 rewrite, Bernd Johannes Wuebben's 1998 Mac-to-Unix addition, and Waterlander's 2010 Unix-to-Mac addition.

The Waterlander package bundled the formerly separate dos2unix and unix2dos packages into a single dos2unix release at version 5.0 in 2010. Later milestones included UTF-16 support in version 6.0 in 2012 and a major cleanup plus test suite in version 7.0 in 2014.

### Adoption history

Benjamin Lin's implementations were distributed through SunSITE.unc.edu, later MetaLab and ibiblio, and became part of Linux distributions including Red Hat, SUSE, Gentoo, and others. The Homebrew source facts also list broad packaging across apk, Debian, Fedora, MacPorts, Nix, pacman, Scoop, Ubuntu, winget, and zypper.

The official homepage continues to publish source archives and ready-to-run binaries for DOS, Windows, and OS/2 alongside Unix-style documentation, reflecting a tool whose user base spans old and modern operating systems.

### How it is used

The package includes dos2unix, unix2dos, mac2unix, and unix2mac commands. It is commonly used in source checkouts, release scripts, build systems, and data-cleanup pipelines when files cross Windows and Unix-like environments.

Modern dos2unix does more than swap CRLF and LF: official documentation covers in-place and paired conversion modes, binary-file skipping, symbolic-link behavior, Unicode UTF-16 to UTF-8 conversion, byte-order-mark handling, recursive conversion recipes, and translated manuals.

### Why package nerds care

dos2unix is a classic small package that persists because text line endings remain a real interoperability boundary. Package maintainers care about it because it is tiny, has no credential or daemon surface, and shows up wherever archives, generated files, or vendored code cross platform conventions.

Its significance is also historical: it preserves SunOS/Solaris-style behavior while adjusting defaults for practical Unix packaging, such as in-place conversion by default in this implementation.

### Timeline

- 1989: John Birchfield creates early dos2unix/unix2dos versions modeled after SunOS/Solaris tools.
- 1995: Benjamin Lin rewrites the implementations from scratch.
- 1998: Mac-to-Unix conversion is added by Bernd Johannes Wuebben.
- 2010: Erwin Waterlander adds Unix-to-Mac conversion and bundles dos2unix and unix2dos into one package as version 5.0.
- 2012: Version 6.0 adds Unicode UTF-16 support.
- 2014: Version 7.0 performs a major cleanup and adds a test suite.
- 2026: Version 7.5.6 is published with the new waterlander.net homepage and updated manual translations.

### Related projects

- The package is related to the historical SunOS/Solaris dos2unix utilities it was modeled after, to Benjamin Lin's earlier public implementations, and to the paired unix2dos/mac2unix/unix2mac commands shipped in the same package.

### Sources

- <https://waterlander.net/dos2unix>
- <https://dos2unix.sourceforge.io/dos2unix/man1/dos2unix.htm>
- <https://formulae.brew.sh/formula/dos2unix>


## 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:** dos2unix
- **Aliases:** unix2dos
- **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 - dos2unix - 7.5.2-1: normalized package name match | Debian stable package indexes: dos2unix from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | convert text file line endings between CRLF and LF | https://waterlan.home.xs4all.nl/dos2unix.html
- Nix - dos2unix: normalized package name match | nixpkgs package indexes: pkgs/by-name/do/dos2unix/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dos2unix - 7.5.1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: dos2unix from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | convert text file line endings between CRLF and LF | https://waterlan.home.xs4all.nl/dos2unix.html
- apk - dos2unix - 7.5.5-r0: normalized package name match | Alpine Linux edge package indexes: dos2unix from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Text file format converters | https://waterlan.home.xs4all.nl/dos2unix.html
- apk - dos2unix-doc - 7.5.5-r0: normalized package name match | Alpine Linux edge package indexes: dos2unix-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Text file format converters (documentation) | https://waterlan.home.xs4all.nl/dos2unix.html
- dnf - dos2unix - 7.5.5-1.fc45: normalized package name match | Fedora Rawhide package metadata: dos2unix from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Text file format converters | https://waterlan.home.xs4all.nl/dos2unix.html
- pacman - dos2unix - 7.5.6-1: normalized package name match | Arch Linux sync databases: dos2unix from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Text file format converter | https://waterlan.home.xs4all.nl/dos2unix.html
- zypper - dos2unix - 7.5.6-1.1: normalized package name match | openSUSE Tumbleweed package metadata: dos2unix from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Text converters to and from DOS/MAC to UNIX | https://waterlander.net/dos2unix/
- MacPorts - dos2unix: normalized package name match | MacPorts ports tree: textproc/dos2unix/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - dos2unix: normalized package name match | Chocolatey community package catalog: dos2unix from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','dnspy'
- Scoop - main/dos2unix: normalized package name match | Scoop official bucket manifest trees: bucket/dos2unix.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - waterlan.dos2unix: normalized package name match | Windows Package Manager source index: waterlan.dos2unix from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [tofrodos](https://www.automicvault.com/pkg/brew/tofrodos/) - Shares av.db curated category or tags: cli, developer-tools, dos, line-endings, text-conversion.
- [gnu-sed](https://www.automicvault.com/pkg/brew/gnu-sed/) - Shares av.db curated category or tags: cli, developer-tools, text-processing, unix.
- [minised](https://www.automicvault.com/pkg/brew/minised/) - Shares av.db curated category or tags: cli, developer-tools, text-processing, unix.
- [opencc](https://www.automicvault.com/pkg/brew/opencc/) - Shares av.db curated category or tags: cli, developer-tools, text-conversion, text-processing.
- [randomize-lines](https://www.automicvault.com/pkg/brew/randomize-lines/) - Shares av.db curated category or tags: cli, developer-tools, text-processing, unix.
- [recode](https://www.automicvault.com/pkg/brew/recode/) - Shares av.db curated category or tags: cli, developer-tools, text-conversion, text-processing.
- [tal](https://www.automicvault.com/pkg/brew/tal/) - Shares av.db curated category or tags: cli, developer-tools, line-endings, text-processing.
- [vip](https://www.automicvault.com/pkg/brew/vip/) - Shares av.db curated category or tags: cli, developer-tools, text-processing, unix.

## Combined YAML source

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