Why is the Windows cmd.exe limited to 80 character

2019-03-07 21:58发布

I love stretching my terminal on unix. What is the history or reason behind windows lame command line?

标签: cmd
13条回答
走好不送
2楼-- · 2019-03-07 22:00

It's not limited.

  1. Run cmd.exe
  2. Click on the icon in the upper left hand of the screen.
  3. Select Properties
  4. Select the Layout tab.
  5. Set the buffer and window widths to whatever you like.
  6. Click OK
  7. Select Save Properties for future...
  8. Click OK.

You might want to check out Console. It's an open source app that lets you run multiple shells in a tabbed environment. You can also set the alpha-transparency of the shells.

查看更多
放荡不羁爱自由
3楼-- · 2019-03-07 22:00

You could also use a different terminal application, such as Console2, which allows you to resize the window all you want (among other things, such as transparency, and the ability to use any font you'd like). It's a great application, I've switched to it and now I only use cmd.exe when I absolutely have to.

查看更多
仙女界的扛把子
4楼-- · 2019-03-07 22:02

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.

查看更多
Lonely孤独者°
5楼-- · 2019-03-07 22:03

As others have pointed out, it's not limited to 80 characters wide, but my guess as to why it defaults to 80 characters would be that it's left over from the DOS days where CRT displays were 80 characters wide.

See also

查看更多
来,给爷笑一个
6楼-- · 2019-03-07 22:04

Since it will scroll left to right as well as up and down, the very first thing I do on a system is define my width as 180 and save it. That's generally enough so that stack traces don't have to wrap for the most part, but not so much that you are waisting a ton of space.

While you're at it, set the vertical size (scrollback buffer) to all 9's. You'll be glad you did some day.

查看更多
欢心
7楼-- · 2019-03-07 22:08

It IS limited. Check it out. (I mean window size NOT buffer)

You will find that the maximum width you can set is limited but varies according to your screen resolution. If your resolution is set to 1024 x 768 you will find that you can only get to 128 on the command prompt width. 128/1024=.125

you will find that ratio to be consistent across the board. I have an RDP session running at 2000x768 (across two of my three monitors) and get a max width of 250.

Now, that actaully turns out to be a little bigger than your actaul monitor size but I have three monitors all running individual desktops. (so in essence, 3 1024x768 resolutions) and if I want to do something SO SIMPLE as stretch a command prompt across 2 or more monitors, I CAN'T. (I want to when doing things with very long paths (diruse.exe/etc.)...

-c

查看更多
登录 后发表回答