I have PuTTY hooked up to a serial port and am reading an output of an AVR.

I send print command like this:

printf("OCR1A: %d \n", OCR1A);

And PuTTY does go to the next line but does not reset the column. Shown hereenter image description here

How can I have PuTTY start the newline column at zero instead 1 + current cursor position?

  • If the remote system is some flavor of Unix, an stty setting should fix that. I think it's stty onlcr.
    – garyjohn
    Oct 4, 2013 at 18:23
  • @garyjohn i'm working with an AVR through serial tx and rx lines.
    – Nick
    Oct 4, 2013 at 18:26

4 Answers 4


Enable the "Implicit CR in every LF" option.

  • Changing it to this gave me garbage charters. The USART communcation I don't think like it.
    – Nick
    Oct 4, 2013 at 18:13
  • It's 2017, and like minicom, this only applies for the output, and just adds extra noise.
    – mckenzm
    Sep 23, 2017 at 21:24
  • 1
    This didn't make any difference at all for me.
    – Owl
    Oct 2, 2018 at 14:19

Putty Doesn't transmit \n, regardless of option settings.

Using Tera Term (open source, windows or linux), you can easily terminate transmissions with \n, \n\r, \r or Auto.

  • Cancel that; -1; Tera Term doesn't run in Linux. Jan 23, 2018 at 20:29

I needed a carriage return as well as a new line character.

printf("Hello world\r\n");
  • 1
    That doesn't even correctly answer your own question, which was how to get PuTTY to handle the \n as a newline with implicit carriage return (\r), and not how to change your code to make it match PuTTY's default behavior.
    – Num Lock
    Nov 30, 2020 at 9:05

Inside the PuTTY Configuration

Go to Terminal and mark this options:

  • Implicit CR in every LF
  • Implicit LF in every CR

putty config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.