Change Screen Buffer Size of Console Window in Windows  

    Change Screen Buffer Size of Console Window in Windows

    Change Screen Buffer Size of Console Window in Windows

    How to Change Screen Buffer Size of Console Window in Windows
    Published by Category: Apps & Features
    07 Jun 2020
    Designer Media Ltd

    How to Change Screen Buffer Size of Console Window in Windows


    A console (or "terminal) is an application that provides I/O to character-mode applications.

    For example: command prompt, PowerShell, or Linux

    The screen buffer size of a console window is expressed in terms of a coordinate grid based on character cells.
    • The width is the number of character cells in each row. The larger the width size, the more text will show in the same row before wrapping.
    • The height is the number of rows. The larger the height size, the further you can scroll before output data (text) is overwritten.

    This tutorial will show you how to change the screen buffer size of a console window (ex: command prompt, PowerShell, Linux) for your account in Windows 7, Windows 8, and Windows 10.

    The screen buffer size you set for a console window will only be applied to the specific console window shortcut that opened it.

    For example, command prompt opened via Win+X menu VS Run (Win+R) dialog. Each location would have its own settings.



    Contents

    • Option One: To Change Screen Buffer Size of Console Window in Properties
    • Option Two: To Change Screen Buffer Size of Console Window using "Mode" Command






    OPTION ONE

    To Change Screen Buffer Size of Console Window in Properties


    1 Open a command prompt, elevated command prompt, PowerShell, elevated PowerShell, or Linux console window you want using the shortcut or location you want to apply a custom screen buffer size to.

    You could also just directly right click on the console window shortcut or file, click/tap on Properties, and go to step 3 below.


    2 Right click or press and hold on the title bar of the console window, and click/tap on Properties. (see screenshot below)

    Change Screen Buffer Size of Console Window in Windows-command_prompt_screen_buffer_size-1.png

    3 Click/tap on the Layout tab, make any width and height adjustments you want for Screen Buffer Size, and click/tap on OK to apply. (see screenshot below)

    The width size you set under Screen Buffer Size will also be applied to the width size under Window Size.

    Change Screen Buffer Size of Console Window in Windows-command_prompt_screen_buffer_size-2.png






    OPTION TWO

    To Change Screen Buffer Size of Console Window using "Mode" Command


    The screen buffer size you set using this option will only be temporary, and only used while the console window is open unless you use Option One above to set it as default.


    1 While you have a command prompt, elevated command prompt, PowerShell, or elevated PowerShell console window open, do step 2 (current size) or step 3 (change size) below for what you would like to do.


    2 To See Current Screen Buffer Size of Console Window

    A) Copy and paste the mode con command into the console window, and press Enter. (see screenshot below)

    Lines = height size

    Columns = width size

    Change Screen Buffer Size of Console Window in Windows-mode_con_command-1.png


    3 To Change Current Screen Buffer Size of Console Window

    A) Type the command below into the console window, and press Enter. (see screenshots below)

    mode con:cols=<Width Size> lines=<Height Size>

    Substitute <Width Size> in the command above with the value (ex: "90") you want for the screen buffer width size. The width size you set for Screen Buffer Size will also be applied to the width size for Window Size.

    Substitute <Height Size> in the command above with the value (ex: "20") you want for the screen buffer height size.

    For example: mode con:cols=90 lines=20

    Change Screen Buffer Size of Console Window in Windows-mode_con_command-2.png
    Change Screen Buffer Size of Console Window in Windows-mode_con_command-3.png


    That's it,
    Shawn






  1. Posts : 2,450
    Windows 10 Pro x64
       #1

    Shawn, just a note, for Option 2.

    The command:
    mode con:cols=<Width Size> lines=<Height Size>
    or
    mode <Width Size>, <Height Size>

    has a slight problem, which you have already noted “the width size you set under Screen Buffer Size will also be applied to the width size under Window Size”.

    So if somebody just wants to change the Screen Buffer Size (Height size) without altering the size of the window the only solution I found was to run from the command prompt, the following PS commands, as PowerShell can alter just the buffer size, without changing the window size:

    Code:
    %SystemRoot%\system32\WindowsPowerShell\v1.0\PowerShell.exe -ExecutionPolicy ByPass -NonInteractive -Command "& {$NewBufferSize=$Host.UI.RawUI.BufferSize;$NewBufferSize.Height=3000;$Host.UI.RawUI.BufferSize=$NewBufferSize;}"
    OR
    Run the bat file Change_Buffer_Size.bat

    This will open a PS session, change the Screen Buffer Size of the current Command Prompt window, and will close, without the user noticing anything.
      My Computer


  2. Posts : 68,667
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    Thank you Dimitri. :)
      My Computers


  3. Posts : 2,450
    Windows 10 Pro x64
       #3

    Glad to have have contributed, to a more complete solution! That's what the best Win10 forum is all about.:)
      My Computer


  4. Posts : 36
    Windows 10 (2009)
       #4

    Thanks very much! it is exactly what I was looking for!!
    Once the size is customized, does somebody know the registry key corresponding to this settings ?? I would like to backit up for future easy restore.
    PS: I need to the Telnet windows. Why? I use to reboot my router through Telnet, and like a small minimalist windows, so I resized the windows to the angle of my screen when launched, some now I would like to my a backup of my settings....
    Thx
      My Computer


 

Tutorial Categories

Change Screen Buffer Size of Console Window in Windows Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:40.
Find Us




Windows 10 Forums