Skip to content

LF — Line Feed ​

Byte0x0A
MnemonicLF
Otty support✓

Description ​

Moves the cursor down one row. The column does not change — to start a new line in the leftmost column you need CR LF (or NEL).

If the cursor is at the bottom of the active region, LF scrolls the region up by one line.

When LNM (line-feed/new-line mode, CSI 20 h) is set, LF behaves like NEL (also moves to column 1). LNM is off by default; almost all modern programs assume CR-then-LF for newlines.

Example ​

bash
printf 'line1\nline2'    # \n is the C escape for LF
                          # output: line1 \n line2 — note "line2" starts under
                          # the last column of "line1" if no CR is sent
  • CR — pair with LF for "newline".
  • NEL — combined CR + LF in one byte sequence.

Otty