Install Dos2unix On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Install Dos2unix On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

dos2unix

convert text file line endings between CRLF and LF

Maintainer: Jari Aalto



Section: text

Install dos2unix

  • Debian apt-get install dos2unix Click to copy
  • Ubuntu apt-get install dos2unix Click to copy
  • Alpine OS apk add dos2unix Click to copy
  • Arch Linux pacman -S dos2unix Click to copy
  • Kali Linux apt-get install dos2unix Click to copy
  • CentOS yum install dos2unix Click to copy
  • Fedora dnf install dos2unix Click to copy
  • Raspbian apt-get install dos2unix Click to copy
  • macOS brew install dos2unix Click to copy

dos2unix

convert text file line endings between CRLF and LF

This package contains utilities dos2unix, unix2dos, mac2unix, unix2mac to convert the line endings of text files between UNIX (LF), DOS (CRLF) and Mac (CR) formats. Text files under Windows and DOS typically have two ASCII characters at the end of each line: CR (carriage return) followed by LF (line feed). Older Macs used just CR, while UNIX uses just LF. While most modern editors can read all these formats, there may still be a need to convert files between them. This is the classic utility developed in 1989.

Installing dos2unix command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS operating systems. Once you run the command it will install the latest version of dos2unix 2026 package in your OS.