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 or credit card

Please note that this article is published by under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean