How to install dos2unix on Linux

Last updated on November 21, 2020 by Dan Nanni

DOS-based text files use a pair of carriage return (CR) and line feed (LF) as a new-line delimiter. On the other hand, UNIX-based text files simply use LFs to terminate each line. In order to convert a text file from DOS format to UNIX format, you can use a command-line tool called dos2unix.

Install dos2unix on CentOS/Fedora/RHEL

$ sudo yum install dos2unix

Install dos2unix on Ubuntu/Debian

$ sudo apt install tofrodos
$ sudo ln -s /usr/bin/fromdos /usr/bin/dos2unix

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (BTC Wallet: 1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

Xmodulo © 2020 ‒ About ‒ Powered by DigitalOcean