Session and utilities

The unix2dos command

Converts a file from Unix line endings (LF) to Windows (CRLF).

Syntax

unix2dos archivo...

Copy-ready examples

$ printf 'a\n' > u.txt && unix2dos u.txtConvert to Windows format

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • It only changes the line endings, not the character encoding.

Related commands

FAQ

When do I need it?

To open a text created on Linux with Windows Notepad without seeing it all on one line.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course