13

Windows Command Line window has a fixed size. You can change it, but not on-the-fly, with a mouse.

But maybe it's just me or my system (Windows 7).

Can you dynamically resize Windows Command Line window?

7 Answers 7

12

In windows 7 use the mode command.

mode con:cols=80 lines=40
4
  • Works even with Windows 10 PowerShell.
    – Harry
    Jul 10, 2015 at 21:48
  • Great!, works on winxp too.
    – Alan Duan
    Jul 10, 2016 at 3:49
  • You lose the vertical scroll though, at least on Win7
    – golimar
    Aug 1, 2017 at 13:11
  • 1
    @golimar, you can leave off the lines=40 (or change the number to something larger) to just change the number of columns. You still loose the previous buffer/history, however.
    – Cemafor
    Oct 3, 2017 at 16:22
9

This is done via the Properties > Layout tab of the window or the shortcut.

enter image description here

Detailed instructions - How to Make the Windows Command Prompt Wider

2
  • 5
    this i know, this is not dynamic. I'd like it to behave like a terminal on linux
    – Parobay
    Apr 17, 2013 at 13:25
  • 1
    If you set it to a large size, can't you re-size it smaller as you wish?
    – CharlieRB
    Apr 17, 2013 at 14:14
5

You can change the screen buffer size in the Layout tab of the Preferences dialog (click on the icon in the top left corner of the window to get to the menu). Making the screen buffer bigger will allow you to then change the window size.

If you do this though, the text will extend past the window and you will have to scroll to see it. There is no way to dynamically change the screen buffer size like you want AFAIK.

5

As other users have pointed out: it is impossible with standard cmd. You can only adjust the window size via parameters.

I found an extension to cmd called Console.

http://sourceforge.net/projects/console/?source=navbar

You just install/extract it and make it visible in the PATH. Console enables you to resize the window, set transparency, use tabs etc. etc. Very useful!


edit: a new project called cmder has emerged recently: https://github.com/cmderdev/cmder

It looks VERY promissing!!

2
  • The above statement isn't completely true. You can resize with the mouse. But dragging from the corners, not the top and bottom. Although, width appears to be limited to the configured width property as a maximum.
    – John Rocha
    Jul 10, 2015 at 20:33
  • What needs to be added to the PATH variable? Can this replace the cmd window?
    – Halcyon
    Sep 7, 2016 at 21:41
4

via https://stackoverflow.com/a/35302566/923560 :

A simple command to fix the window size that I use all the time:

wmic

It will open the Windows Management Instrumentation Command-line and remove the size limits. Then just close it with Ctrl+C.

3

Windows 10 command prompt has that now. The buffer size automatically grows and shrinks when you use the resize arrows.

Reference:

https://blogs.windows.com/buildingapps/2014/10/07/console-improvements-in-the-windows-10-technical-preview/

1
  • I'm so excited! Real mouse resizing, line-based selection, shift-key selection, real word wrapping that doesn't insert line breaks into your selection when you copy... wow. It's finally happened. And it only took ~25 yrs. Now if my company would only update our systems to Windows 10... Jan 12, 2017 at 14:55
0

You can also increase the command prompt window size through command lines

ex:mode 250

In the place of 250 add any value of your wish.

1
  • Can you confirm this works. I have just tested it with no result. Mar 17, 2014 at 11:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .