Connecting from Windows to Linux (CentOS 5.4) using PuTTY. Console set at 140col 60 lines. Not much else changed from default.

Connection is via serial cable to the box.

On Linux, installed and ran screen. Lines appear capped at 24 or so, cols at 80-ish.

Tried 'Ctrl-A :height -w' and it gave me a message along the lines of my terminal doesn't know how to change the height.

How can I make screen use the existing console size, or, resize screen once started?


When you start a virtual terminal connected to something like an X terminal emulator or an SSH session, the terminal size is configured for you (e.g. forwarded over SSH from your local terminal). As you've discovered, when connecting over a raw serial port, this does not happen.

Option 1: just run


This command will attempt to discover the size of your terminal using terminal emulation escape codes. It will configure the local terminal to match. Normally this is all you have to do.

Option 2: set your terminal size manually using:

stty rows <N> cols <M>
  • Calling resize gives me the following statusline message: resize: need more than one region is there any way to make this happen automatically? ^a i (info) shows the correct lines and cols so I don't understand why it's not drawing correctly. Only other clue: echo $TERM gives vt102 – thom_nic Jan 23 '17 at 16:45
  • Update: I see resize is part of the xterm package which is not installed on my distro. Found solution here. – thom_nic Jan 23 '17 at 17:32

I just had a problem similar to this. When I reattach to the screen like below, it works for me. Otherwise try stty as stated above.

screen -A -h 500 -r 16238.pts-11.myhost2

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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