How To Install dos2unix on Fedora 34

dos2unix is Text file format converters

Introduction

In this tutorial we learn how to install dos2unix on Fedora 34.

What is dos2unix

Convert text files with DOS or Mac line endings to Unix line endings and vice versa.

We can use yum or dnf to install dos2unix on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install dos2unix.

Install dos2unix on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install dos2unix using dnf by running the following command:

sudo dnf -y install dos2unix

Install dos2unix on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install dos2unix using yum by running the following command:

sudo yum -y install dos2unix

How To Uninstall dos2unix on Fedora 34

To uninstall only the dos2unix package we can use the following command:

sudo dnf remove dos2unix

dos2unix Package Contents on Fedora 34

/usr/bin/dos2unix
/usr/bin/mac2unix
/usr/bin/unix2dos
/usr/bin/unix2mac
/usr/lib/.build-id
/usr/lib/.build-id/39
/usr/lib/.build-id/39/7f41ef1b1da953583203761e94afda81f75e1d
/usr/lib/.build-id/54
/usr/lib/.build-id/54/62fe761b24de9ea6f880a5e21f6994a79356b8
/usr/share/doc/dos2unix
/usr/share/doc/dos2unix/ChangeLog.txt
/usr/share/doc/dos2unix/NEWS.txt
/usr/share/doc/dos2unix/README.txt
/usr/share/doc/dos2unix/TODO.txt
/usr/share/doc/dos2unix/dos2unix.htm
/usr/share/licenses/dos2unix
/usr/share/licenses/dos2unix/COPYING.txt
/usr/share/locale/da/LC_MESSAGES/dos2unix.mo
/usr/share/locale/de/LC_MESSAGES/dos2unix.mo
/usr/share/locale/eo/LC_MESSAGES/dos2unix.mo
/usr/share/locale/es/LC_MESSAGES/dos2unix.mo
/usr/share/locale/fr/LC_MESSAGES/dos2unix.mo
/usr/share/locale/fur/LC_MESSAGES/dos2unix.mo
/usr/share/locale/hu/LC_MESSAGES/dos2unix.mo
/usr/share/locale/ja/LC_MESSAGES/dos2unix.mo
/usr/share/locale/nb/LC_MESSAGES/dos2unix.mo
/usr/share/locale/nl/LC_MESSAGES/dos2unix.mo
/usr/share/locale/pl/LC_MESSAGES/dos2unix.mo
/usr/share/locale/pt_BR/LC_MESSAGES/dos2unix.mo
/usr/share/locale/ru/LC_MESSAGES/dos2unix.mo
/usr/share/locale/sr/LC_MESSAGES/dos2unix.mo
/usr/share/locale/sv/LC_MESSAGES/dos2unix.mo
/usr/share/locale/uk/LC_MESSAGES/dos2unix.mo
/usr/share/locale/vi/LC_MESSAGES/dos2unix.mo
/usr/share/locale/zh_CN/LC_MESSAGES/dos2unix.mo
/usr/share/locale/zh_TW/LC_MESSAGES/dos2unix.mo
/usr/share/man/de/man1/dos2unix.1.gz
/usr/share/man/de/man1/mac2unix.1.gz
/usr/share/man/de/man1/unix2dos.1.gz
/usr/share/man/de/man1/unix2mac.1.gz
/usr/share/man/es/man1/dos2unix.1.gz
/usr/share/man/es/man1/mac2unix.1.gz
/usr/share/man/es/man1/unix2dos.1.gz
/usr/share/man/es/man1/unix2mac.1.gz
/usr/share/man/fr/man1/dos2unix.1.gz
/usr/share/man/fr/man1/mac2unix.1.gz
/usr/share/man/fr/man1/unix2dos.1.gz
/usr/share/man/fr/man1/unix2mac.1.gz
/usr/share/man/man1/dos2unix.1.gz
/usr/share/man/man1/mac2unix.1.gz
/usr/share/man/man1/unix2dos.1.gz
/usr/share/man/man1/unix2mac.1.gz
/usr/share/man/nl/man1/dos2unix.1.gz
/usr/share/man/nl/man1/mac2unix.1.gz
/usr/share/man/nl/man1/unix2dos.1.gz
/usr/share/man/nl/man1/unix2mac.1.gz
/usr/share/man/pl/man1/dos2unix.1.gz
/usr/share/man/pl/man1/mac2unix.1.gz
/usr/share/man/pl/man1/unix2dos.1.gz
/usr/share/man/pl/man1/unix2mac.1.gz
/usr/share/man/pt_BR/man1/dos2unix.1.gz
/usr/share/man/pt_BR/man1/mac2unix.1.gz
/usr/share/man/pt_BR/man1/unix2dos.1.gz
/usr/share/man/pt_BR/man1/unix2mac.1.gz
/usr/share/man/sv/man1/dos2unix.1.gz
/usr/share/man/sv/man1/mac2unix.1.gz
/usr/share/man/sv/man1/unix2dos.1.gz
/usr/share/man/sv/man1/unix2mac.1.gz
/usr/share/man/uk/man1/dos2unix.1.gz
/usr/share/man/uk/man1/mac2unix.1.gz
/usr/share/man/uk/man1/unix2dos.1.gz
/usr/share/man/uk/man1/unix2mac.1.gz
/usr/share/man/zh_CN/man1/dos2unix.1.gz
/usr/share/man/zh_CN/man1/mac2unix.1.gz
/usr/share/man/zh_CN/man1/unix2dos.1.gz
/usr/share/man/zh_CN/man1/unix2mac.1.gz

References

Summary

In this tutorial we learn how to install dos2unix on Fedora 34 using yum and dnf.