那些使用Windows 终端(Windows Terminal)的人都知道它的使用有多重要,而且通常是多频繁。您可能会发现自己在每次使用默认Windows 终端窗口时都在调整它的大小。(Windows Terminal)也许它对你来说太小了,或者相反。虽然进行这种调整很容易(您只需拖动鼠标),但最好选择您喜欢的尺寸,以便它始终以这种方式打开。在本文中,我们将告诉您如何在 Windows 11/10中更改Windows 终端的默认高度和宽度。(Windows Terminal)
如何更改Windows 终端(Windows Terminal)的默认高度(Height)和宽度(Width)
此选项可在启动(Startup)设置中找到,并且此处所做的更改扩展到您的所有配置文件,即PowerShell、WSL、命令提示符(Command Prompt)等。您可以通过两种方式执行此操作:
使用终端(Terminal)设置更改Windows 终端(Windows Terminal)默认高度和宽度
打开您的开始(Start)菜单并搜索单词终端。您将看到一个运行Windows Terminal的选项,单击它。您选择作为终端的配置文件将运行,在这种情况下,它是PowerShell。您将在“终端(Terminal)”选项卡旁边看到一个下拉选项。单击(Click)它并选择设置(Settings)。
在这里,单击左侧选项窗格中的启动选项卡。(Startup)向下滚动(Scroll)并在启动大小标题下,您可以调整终端的行和列的大小。完成后,单击保存以实施此更改。重新启动您的终端,它将以新保存的尺寸打开。
使用.JSON(.JSON)文件更改Windows 终端(Windows Terminal)默认高度和宽度
更改终端尺寸的另一种方法是修改其.JSON 文件。
- 从开始菜单(Start Menu)启动Windows 终端(Windows Terminal)
- 打开终端选项卡旁边的下拉菜单,然后单击设置
- 左侧窗格中的最后一个选项是打开JSON文件(访问它的首选应用程序是IDE)
- 在“Actions”括号后键入以下行并保存更改
"initialCols": 108,
"initialRows": 25,
重新启动终端,您将观察到更改已实施。
如果您不使用Windows 终端(Windows Terminal)应用程序,而是直接使用首选配置文件(CMD或PowerShell),请不要担心,因为您也可以更改它们各自的默认大小。我们将演示如何使用命令提示符(Command Prompt)执行此操作,但可以按照相同的步骤使用PowerShell复制该过程。(PowerShell)
- (Search CMD)在开始菜单中(Start)搜索CMD,点击以管理员身份运行
- 右键单击顶部的平板
- 打开 CMD 的属性
- 访问布局选项卡并调整窗口大小(Window Size)
- 单击(Click)确定保存更改,您将观察到终端的窗口大小已调整
要使用您的PowerShell(PowerShell)进行相同的更改,请改为搜索并按照上面规定的相同步骤进行操作。
我可以更改Windows 终端(Windows Terminal)配置文件的字体大小和字体粗细吗?
Windows 终端还提供了设置 font-weight 的功能(provides the feature to set font-weight)。您将能够将 font-weight 设置为 Normal、 Bold、 Semi-Light、 Thin、 Extra-Light、 Semi-Bold、 Medium、 Black、 Extra-Black、 Extra-Bold或自定义(介于 0 到 1000 之间)。
如何将Windows 终端(Windows Terminal)设置重置为默认值?
如果您在更改设置后遇到一些意外问题,或者您对自定义不满意,则将Windows 终端设置重置(resetting Windows Terminal settings)为默认设置可能会有所帮助。
我们希望这对您有所帮助,并且您现在可以更方便地使用Windows 终端。(Windows Terminal)
How to change default Height and Width of Windows Terminal window
Those of you who υsе the Windows Terminal know how important and, oftentimeѕ, how frequent its use can be. You may find уоurѕelf arranging the sizе of the default Windows Terminal window every time you use it. Maybe it is too small for you or the other way around. While іt is rather easy to make that adjustment (you just have to drag your mouse around), it is better to pick your prefеrred dimensions so that it always opens that way. In this article, we will tell you how you can change the default height and width of Windows Terminal in Windows 11/10.
How to change default Height and Width of Windows Terminal
This option is found in the Startup settings and the changes made here extend to all your profiles i.e., PowerShell, WSL, Command Prompt, etc. There are two ways in which you can do that:
- Via the Terminal Settings
- Using the .JSON file
Change Windows Terminal default height & width using Terminal settings
Open your Start menu and search the word terminal. You’ll see an option to run the Windows Terminal, click on it. The profile that you’ve selected to be your terminal will run, in this case, it is PowerShell. You’ll see a drop-down option next to the Terminal tab. Click on it and select Settings.
Here, click on the Startup tab from the options pane to your left. Scroll down and under the launch size head, you can adjust the size of the rows and columns of your terminal. Once done, click on save to implement this change. Relaunch your terminal and it will open in the newly saved dimensions.
Change Windows Terminal default height & width using .JSON file
An alternative method to change the terminal’s dimensions is to modify its.JSON file.
- Launch Windows Terminal from the Start Menu
- Open the drop-down next to the terminal tab and click on Settings
- The last option in the left side pane is to open the JSON file (the preferrable app to access it is an IDE)
- Type the following lines after the “Actions” bracket and save the changes
"initialCols": 108,
"initialRows": 25,
Relaunch the terminal and you’ll observe that the changes have been implemented.
If you do not use the Windows Terminal app and instead use your preferrable profile (CMD or PowerShell) directly, worry not since you can change their individual default sizes as well. We will demonstrate how you can do that with the Command Prompt but the process can be replicated with PowerShell by following the same steps.
- Search CMD on the Start menu and click to run it as the administrator
- Right-click on the top slab
- Open CMD’s properties
- Visit the layout tab and adjust the Window Size
- Click on Ok to save the changes and you’ll observe that your terminal’s window size has been adjusted
To make the same change with your PowerShell, search for that instead and follow the same steps and prescribed above.
Can I change font size and font weight for a Windows Terminal profile?
Windows Terminal also provides the feature to set font-weight. You will be able to set font-weight to Normal, Bold, Semi-Light, Thin, Extra-Light, Semi-Bold, Medium, Black, Extra-Black, Extra-Bold, or custom (between 0 to 1000).
How to reset Windows Terminal settings to default?
If you’re experiencing some unexpected problems after changing the settings or you’re not happy with the customizations, then resetting Windows Terminal settings to default might be helpful.
We hope that this was able to help you and that you are now able to use the Windows Terminal with even greater convenience.