Which format (Mac or DOS) should I use on Linux PCs/Clusters?
- DOS format uses "carriage return" (CR or
\r
) then "line feed" (LF or\n
). - Mac format uses "carriage return" (CR or
\r
) - Unix uses "line feed" (LF or
\n
)
I also know how to select the option:
- AltM for Mac format
- AltD for DOS format
But there is no UNIX format.
Then save the file with Enter.
Best Answer
Use neither: enter a filename and press Enter, and the file will be saved with the default Unix line-endings (which is what you want on Linux).
If
nano
tells you it’s going to use DOS or Mac format (which happens if it loaded a file in DOS or Mac format), i.e. you seeor
press AltD or AltM respectively to deselect DOS or Mac format, which effectively selects the default Unix format.