When I save a file using nano on linux (bash), I get a message asking me to choose the format. There are two options: DOS Format and MAC Format. Can someone explain to me the difference between them?
If you just press enter and no option, you save it in the same file-format which was detected. (That is the third option, and the option to prefer for Linux.)
If you selected an option you can deselect it again with pressing again "Alt" & "m" for deselecting [MAC-Format] or "Alt" & "d" for deselecting [DOS-Format]. If there is no option selected you use the UNIX-Format "line flyback" (LF or \n), which is most likely the format to prefer on Linux. The selected option is written just before the file name in the bottom.
see also: https://unix.stackexchange.com/questions/396551/gnu-nano-2-dos-format-or-mac-format-on-linux