In the 'olden days', when we used Teletype writers (TTY), the CR (Carriage Return) (CHR(13)) ('\r') would move the 'carriage' back to the left, and a LF (Line Feed) (CHR(10)) ('\n') would advance the roller one line. Thus the popularity of CR-LF to end a line in MSDOS text files.
Unix got 'smarter', and so automatically gave you a CR-LF if you only specified an LF.
Comments
It moves the cursor to the next line, so using several in a row moves the cursor several lines.
Here is more about the history: en.wikipedia.org/wiki/Carriage_return
Unix got 'smarter', and so automatically gave you a CR-LF if you only specified an LF.