Download Windows Speedup Tool to fix errors and make PC run faster
This post will help you change font size for a Windows Terminal profile on Windows 11/10 computer. There are so many interesting Windows Terminal Tips and Tricks available that users find quite useful. One of such tips is to change the default font size. You can set the font size between 1 to 128 for any profile (like Command Prompt, PowerShell, etc.). The default font size set for a profile in Windows Terminal is 12. While some users find it satisfactory, others want to increase or decrease font size from time to time. If you also want to do that, this post covers some simple steps for that.
Apart from changing the font size, 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). So, depending on the font size set by you, you can select a font-weight that will best fit that font size.
To change the font size for a profile in Windows Terminal, you need to follow these steps:
- Open Windows Terminal
- Open Settings page
- Select a Windows Terminal profile
- Access the Appearance page for the selected profile
- Set font size
- Use the Save button.
First of all, use the Start menu or Search box to open the Windows Terminal app. It will open with the default profile set by you.
After this, open its Settings page. Use Ctrl+, hotkey to open it. Alternatively, you can simply click on the drop-down menu present on the top part and select the Settings option to open it.
Now you need to select a profile for which you want to change the font size. Use the Profiles section available on the left side and select a profile. After that, access the Appearance page using the right section.
Finally, you can change the font size using the given option. The option to set font-weight is also there. Once the font size is changed, use the Save button.
Now access that Windows Terminal profile and you will see that font size is changed.
This post will help you if CTRL+ does not increase Font size in Windows Terminal.
I hope it helps.
Read next: How to change default profile in Windows Terminal.
Laxman has done Bachelor’s in Computer Science, followed by an MBA. Writing about Windows OS and the free software and services that are available for the Windows operating system is what excites him.
Последнее время стало модным использовать продвинутую командную строку в PowerShell или bash/zsh. В этой статье я расскажу, что нужно сделать в PowerShell, WSL, Windows Terminal и VS Code, чтобы кастомизировать командную строку и воспользоваться всеми её преимуществами.
Краткий план действий:
- Установка шрифта Nerd
- Установка и настройка Oh My Posh для PowerShell
- Установка и настройка Oh My Posh для WSL
- Настройка Windows Terminal для правильного отображения глифов
- Настройка Windows VS Code для правильного отображения глифов
Из официальной документации я мало что понял. Пришлось разбираться самому. Поэтому сейчас я по порядку опишу путь, который пришлось пройти мне, чтобы заставить всё работать как надо.
Установка шрифта Nerd
На картинке выше, показаны некоторые варианты оформления (тем) командной строки. На самом деле таких тем много, и вы можете их изменять и создавать свои. Как вы видите, почти все варианты содержат глифы (графические символы). Если шрифт, который используется в терминале, не содержит соответствующие глифы, в командной строке могут появиться символы замены, например квадрат — ▯ или знак вопроса �. Чтобы в терминале отображались все глифы, нужно сначала установить шрифт Nerd
с сайта проекта https://www.nerdfonts.com/.
Nerd Fonts улучшает предназначенные для разработчиков шрифты с большим количеством глифов (значков). В частности, чтобы добавить большое количество дополнительных глифов из популярных «культовых шрифтов», таких как Font Awesome, Devicons, Octicons и других.
Посмотрев несколько шрифтов, я остановил свой выбор на Caskaydia Cove Nerd Font.
Все шрифты можно посмотреть по ссылке https://www.nerdfonts.com/font-downloads.
Скачав нужный шрифт, нужно его установить. Заходим в архив, выбираем нужный шрифт и открываем его.
А затем, в открывшемся окне, нажимаем кнопку Install
Шрифт установлен, можно переходить к следующему шагу — установке Oh My Posh
.
Установка и настройка Oh My Posh для PowerShell
Как сказано в официальной документации, Oh My Posh
— это настраиваемый механизм командной строки, для любой оболочки, которая имеет возможность настроить командную строку с помощью функции или переменной. Чтобы воспользоваться этим механизмом в PowerShell
, нужно установить и импортировать соответствующий модуль.
Но это может не получится, если параметр ExecutionPolicy
в PowerShell
установлен в Restricted
или иное значение, которое не позволяет запускать удалённые скрипты. Что бы проверить текущие политики, выполните команду Get-ExecutionPolicy
. Чтобы их изменить, запустите PowerShell
от имени администратора и выполните команду и нажмите Y
, а затем Enter
для подтверждения.
Set-ExecutionPolicy RemoteSigned
Это позволит вам установить нужный модуль.
ВНИМАНИЕ: После изменения ExecutionPolicy закройте окно
PowerShell
, которое вы открывали с повышенными привелегиями и откройте новое, с правами обычного пользователя.
Чтобы установить модуль Oh My Posh
выполните следующую команду.
Install-Module oh-my-posh -Scope CurrentUser
Если пакетный менеджер NuGet
ещё не установлен, то PowerShell
запросит разрешение на его установку. Введите Y
и нажмите Enter
.
Далее вас предупредят, что вы собираетесь ставить модуль из недоверенного репозитория PSGallery
. На самом деле всё нормально. Просто изначально все репозитории считаются недоверенными. Можете смоело продолжать установку введя Y
и нажав Enter
.
Обновите профиль PowerShell
, отредактировав файл Microsoft.PowerShell_profile.ps1
. Самым простым способом открытия этого файла, явялется выполнение следующей команды.
Если файла не существует, то система предложет вам его создать. Нажмите Yes
в диалоговом окне.
Добавьте следующий фрагмент в конце файла. Вместо jandedobbeleer
можете написать название другой темы. Я для себя выбрал именну эту.
Import-Module oh-my-posh
Set-PoshPrompt -Theme jandedobbeleer
Сохраните и закройте файл. Теперь каждый новый экземпляр PowerShell
будет запущен с импортом Oh My Posh
и установкой темы командной строки.
Запустите новый экземляр PowerShell
. При первом запуске вы можете увидеть процесс импорта установленного ранее модуля Oh My Posh
. Он выполниться один раз. Все последующие запуски PowerShell будут проходить как обычно.
После запуска вы увидите обновлённую командную строку, как показано на картинке ниже. Обратите внимание, что не все символы отображаются корректно. Это связано с тем, что в терминале PowerShell
сейчас используется шрифт, который не поддерживает глифы.
Зайдите в настройки терминала PowerShell и выберите шрифт с поддержкой глифов, который вы установили ранее. Или установите его сейчас, если вы пропустили этот шаг.
Как установить шрифт с поддержкой глифов, смотри в начале статьи.
Как только вы установите нужный шрифт, вы сразу же увидите правильное отображение командной строки.
Установка и настройка Oh My Posh для WSL
Если вы используете Windows 10 версии 2004 и выше (Build 19041 и выше) или Windows 11, и у вас ещё не установлен WSL, но вы хотите его установить, то запустите команду
wsl --install
в терминале powershell с повышенными привилегиями, а после установки WSL перезапустите Windows. После перезапуска, установка продолжится. Более подробные сведения об установке и настройке WSL смотрите в моей статье “Установка и настройка WSL”(comming soon...)
Для установки Oh My Posh
в Linux (WSL) нам потребуется пакетный менеджер Homebrew. Поэтому сначала запустите WSL и установите там Homebrew
, выполнив следующую команду и следуйте инструкциям в окне терминала.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
После того, как Homebrew
будет установлен, нужно выполнить неколько команд, чтобы добавить Homebrew
в PATH
и в профиль командной оболочки bash
.
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile
echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile
После установки и настройки Homebrew
, можно приступать к установке Oh My Posh
. Выполните следубщие команды.
brew tap jandedobbeleer/oh-my-posh
brew install oh-my-posh
Установите пакет unzip. Он понадобится для распаковки архива с темами. Этот шаг можно пропустить, если вы скачаете тему самостоятельно, извлекёте из архива файл с темой для Oh My Posh
и положите его в домашнюю директорию пользователя. Иначе, выполните нижеследующие команды.
Теперь нужно скачать и распаковать темы.
mkdir -p $(brew --prefix)/oh-my-posh/themes
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O $(brew --prefix)/oh-my-posh/themes/themes.zip
unzip $(brew --prefix)/oh-my-posh/themes/themes.zip -d $(brew --prefix)/oh-my-posh/themes
chmod u+rw $(brew --prefix)/oh-my-posh/themes/*.json
rm $(brew --prefix)/oh-my-posh/themes/themes.zip
Скопируйте файл темы в домашнюю директорию.
cp $(brew --prefix)/oh-my-posh/themes/jandedobbeleer.omp.json ~/jandedobbeleer.omp.json
А затем запустите oh-my-posh
.
test -e ~/jandedobbeleer.omp.json && eval "$(oh-my-posh --init --shell bash --config ~/jandedobbeleer.omp.json)"
Вы увидите, что командная строка изменилась. Если она отображается не правильно, то измените шрифт в настройках вашего терминила, как говорилось ранее.
На этом установка и настройка Oh My Posh
для WSL
завершена.
Настройка Windows Terminal для правильного отображения глифов
После запуска Windows Terminal
вам нужно будет тольк сменить шрифт, иначе командная строка будет отображаться без глифов.
Чтобы это исправить, зайдите в настройки Windows Terminal
, выберите профиль по умолчанию и на вкладке Appearance
установите нужный шрифт. Затем нажмите Save
и откройте новое окно терминала.
На этот раз командная строка будет отображать глифы, но есть одна проблема. При открытии WSL-терминала, первая командная строка отображается с дефектом. В ней присутствуют пропуски. Я не понял почему это происходит. Если нажать Enter
, то следующая строка отобразиться нормально.
Я не придумал ничего лучше, чем добавить команду очистки экрана в файл .profile
, чтобы она выполнялась каждый раз, при запуске сессии. Вы тоже можете это сделать, выполнив следующую команду.
echo "clear" >> ~/.profile
Теперь, если переоткрыть терминал, то всё будет выглядеть как надо.
И на этом часть по настройке Windows Terminal
завершена. Посмотрите другю мою статью, где я описываю, как настроить более приятный вид Windows Terminal
(comming soon...)
.
Настройка VS Code для правильного отображения глифов
Если вы откроете VS Code, и в нём откроете Terminal
, то вы увидите, что глифы в нём тоже отображатся неправильно. Всё дело в настройках шрифтов.
Зайдите в настройки, выберите Terminal
, пролистайте до настройки Integrated: Font Family
и введите название своего шрифта. В моём случае это CaskaydiaCove NF
. Полное название настройки terminal.integrated.fontFamily
, можете вбить её в строку поиска настроек, для быстрого перехода к ней.
Если вы используете плагин Remote - WSL
в VS Code
, то возможно вам пригодится ещё один совет. Дело в том, что когда вы откроете новую сессию в WSL
в VS Code
, то заметите, что там ничего не поменялось. VS Code
, при запуске bash
в WSL
, не читает данные из файла .profile
, которые мы туда поместили.
Чтобы это исправить, можно ввести команду
Параметр -l (согласно справочной странице) заставляет «bash действовать так, как если бы он был вызван как оболочка входа в систему». Оболочки входа читают определенные файлы инициализации из вашего домашнего каталога, такие как
.profile
.
Но чтобы не делать это каждый раз вручную, давайте изменим конфигурацию VS Code.
К уже имеющимся настройкам, если они есть, добавьте следующие.
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
"args": [
"-l"
]
}
}
Сохраните и перезапустите WSL-сессию. На этот раз у Вас всё должно отображаться правильно.
Вот и всё, чем я хотел поделиться в этой статье. Оставльяйте свои комментарии и отзывы. Всем мира и добра!
On Windows 11 or 10, the Windows Terminal app comes with a predefined set of customization settings, including the “Cascadia Mono” as the default font on every profile.
However, changing the default font face to anything you want is possible. For example, if you prefer the “Consolas” font, the original default for Command Prompt, or any other font face available on your device with the settings UI or the “settings.json” file.
This guide will teach you how to change the default font face for the Windows Terminal app on Windows 11 or 10.
- Change default Windows Terminal font face with settings UI
- Change default Windows Terminal font face with settings.json
Change default Windows Terminal font face with settings UI
To change the default font face with the settings UI, use these steps:
-
Open Windows Terminal.
-
Use the Shift + Ctrl + , (comma) keyboard shortcut to open the settings UI.
-
Click on Defaults.
-
Click the Appearance tab.
-
Under the “Text” section, use the “Font face” setting and type the name of the style – for example, Consolas.
-
Click the Save button in the bottom-right corner.
Once you complete the steps, the new font style will apply immediately to every profile configured on the Windows Terminal.
Configure default specific profile font face
To change the font style for a specific command-line tool, use these steps:
-
Open Windows Terminal.
-
Use the Shift + Ctrl + , (comma) keyboard shortcut to open the settings UI.
-
Click on the profile to change the settings — for example, Windows PowerShell or Command Prompt.
-
Click the Appearance tab.
-
Under the “Text” section, use the “Font face” setting and type the name of the style – for example, Consolas.
-
Click the Save button.
After you complete the steps, only the command-line tool you configured will start using the new font family.
Change default Windows Terminal font face with settings.json
To set a new default font face for the terminal with the settings.json file, use these steps:
-
Open Windows Terminal.
-
Use the Ctrl + Alt + , (comma) keyboard shortcut to open the settings.json file with the default code editor.
Quick tip: It is recommended to use Visual Studio Code. You can also open the file by clicking the menu (down-arrow) button next to the tab and selecting the Settings option.
-
Under the “profiles” section, inside the “defaults” brackets, type the following command to change the font face:
"fontFace": "Consolas"
In the command, make sure to change the Consolas for the name of the font style you want to use.
Quick tip: If you have more than one line of code inside the bracket, ensure all the lines end with a comma (,) except for the last line. Otherwise, the settings may not save correctly. You can find the name of all the available font faces on Settings > Personalization > Fonts.
- Use the Ctrl + S keyboard shortcut to save the file.
After you complete the steps, the font settings will apply automatically.
Configure default specific profile font face
To specify a new font style for a command-line tool with the settings.json file, use these steps:
-
Open Windows Terminal.
-
Use the Ctrl + Alt + , (comma) keyboard shortcut to open the settings.json file with the default code editor.
-
Under the “profiles” section, inside the brackets of the profile you want to update, type the following command to change the font face:
"fontFace": "Consolas"
In the command, make sure to change the Consolas for the name of the font style you want to use.
Quick tip: If you have more than one line of code inside the bracket, ensure all the lines end with a comma (,) except for the last line. Otherwise, the settings may not save correctly.
-
Use the Ctrl + S keyboard shortcut to save the file.
Once you complete the steps, only the profile you configured will start using the new font family.
Why You Can Trust Pureinfotech
The author combines expert insights with user-centric guidance, rigorously researching and testing to ensure you receive trustworthy, easy-to-follow tech guides. Review the publishing process.
Windows Terminal change font it’s an easy task to try and there are a broad range of options. On Windows ten, the Windows Terminal app comes with a predefined set of customization settings that allows you to modification the font face globally and one by one for every console.
If you’re spending a lot of time using Command Prompt in Windows, then you’ll in all probability wish to customize its look. You may want to change the font and colors because you like a certain style or just because you find it easier to read, or it gets easier for your eyes over an extended period of time. For those that want to customize Command Prompt, doing therefore is comparatively easy and during this guide, you will learn and try how to do it for the Windows Terminal app on Windows ten.
In addition to any or all this, Windows Terminal has intensive customization choices to allow it a make-over to fit your style. With simply a number of clicks, you’ll be able to do the modification of the Windows Terminal background such as: color schemes, pointer sorts, acrylic effects, text rendering, anti-aliasing, etc. we are going to cover them in later guides.
Windows Terminal change font – Method 1
The Windows Terminal lets you change the default font face directly from its Settings page. Specifically, you can change the font of each shell individually. Here is how.
- Open the Windows Terminal app.
- Click on the dropdown icon on the title bar.
- Select “Settings” from the menu.
- Select the shell of your choice on the sidebar.
- Go to the “Appearance” tab.
- Type the full font name in the “Font Face” field.
- Click the “Save” button.
- Close and reopen Windows Terminal.
- With that, you’ve changed the default font face in Windows Terminal.
windows terminal change font
Tip: You can get the font face name from the Font directory. Open the Start menu, search for “Font Settings,” find the font of your choice, and type the name as you see it.
Windows Terminal change font – Method 2
1.Open the Windows Terminal app.
2.Use the Ctrl + Alt + , (comma) keyboard shortcut to open the settings.json file with the default code editor.
3.Under the “profiles” section, inside the “defaults” brackets, type the following command to change the font face.
"fontFace": "Consolas"
windows terminal change font using json
In the command, make sure to change the Consolas for the name of the font style you want to use.
4.Use the Ctrl + S keyboard shortcut to save the file
5.Close and reopen Windows Terminal.
6.With that, you’ve changed the default font face in Windows Terminal.
Windows Command Prompt – How to Change the Font
To configure Command Prompt, the first thing you need to do is to open it.
- Press the Windows key, type “cmd” or “Command Prompt”, then hit enter.
- Right-click on the top bar of Command Prompt
The bottom two options are important, “Defaults” and “Properties”. “Defaults” sets system wide Command Prompt settings, that will apply to any shortcut used to open Command Prompt. “Properties” overrides the “Defaults” for that one shortcut to open Command Prompt. As long as you never edit “Properties”, then “Defaults” will apply to all Command Prompt windows. If you ever make a change to the “Properties” of a Command Prompt window, the changes will always override the “Defaults” when that shortcut is used to open Command Prompt.
Tip: The settings in “Defaults” or “Properties” are identical, the difference is in where the changes are applied.
Windows Command Prompt change font
To configure the appearance of the text in Command Prompt, switch to the “Font” tab. Here you can edit the font size and the specific font used in the “Size” and “Font” sections respectively. The “Bold fonts” checkbox, allows you to make all fonts slightly more defined. A preview of the window size is shown in the top-right corner, and a preview of the text appearance in the bottom-left corner.
change font cmd
Windows Command Prompt – How to Change Colors
To configure Command Prompt’s colors, switch to the “Colors” tab. There are four settings you can change, the Screen Text, Screen Background, Popup Text, and Popup Background. “Screen Text” affects the color of text, while “Screen Background” affects the background color of Command Prompt. To set the color, select a setting you want to change, then either set an RGB value in the “Selected Color Values” section in the top-right corner, or select a pre-set color from the row of color boxes just below. The changes are previewed in the “Selected Screen Colors” section.
The two “Popup” settings affect the content of any popup boxes, such as the command history popup when you press F7. Again, “Popup Text” affect the text colour in popup boxes and “Popup Background” affects the background color.
Tip: You can also set the two “Screen” colours in the “Terminal” tab via the “Terminal Colours” section at the top. This method doesn’t have the convenient pre-set colours selection though.
change color cmd
- Do not forget to click the “OK” button.
- Close and reopen Windows Command Prompt
- With that, you’ve changed the default font face in Command Prompt
Conclusions
For those that want to customize Command Prompt or Windows Terminal, doing therefore is comparatively easy and during this guide, we showed you how to do it for the Windows Terminal app on Windows ten.
Table of Contents
The new Windows Terminal is a great replacement for the command prompt on Windows 11 PCs.
Unlike the old cmd.exe, Windows Terminal is customizable, allowing you to open PowerShell windows, connect to remote Azure terminals, and more. You can even customize Windows Terminal to look how you want.
If you’re struggling to see the text results for commands you launch, you might want to know how to customize the Windows Terminal app to suit your needs. This guide will show you how.
How to Change Font in Windows Terminal?
By default, the Windows Terminal app uses Cascadia Mono as the default font face for new Windows PowerShell tabs. You can customize Windows Terminal to use any supported system font on Windows 11.
1. Right click on the Start menu and open the Terminal app.
2. In the Terminal window, press the drop-down arrow on the tab bar then select Settings.
3. In Settings page, select your default profile in the menu on the left then select Appearance on the right.
Note
Note: For most users, the default profile will be Windows PowerShell
4. In Appearance page, choose a new font from the Font face drop-down menu. If you want to use a custom font, select the Show all fonts checkbox and choose a font afterward.
Additionally, in the Appearance page, you can configure the color scheme, font size and font weight as well.
5. Press Save to confirm. Your chosen font should appear automatically. If it doesn’t, close the Terminal window and restart it.
Note
Note: After you complete the steps, only the command-line tool you configured will start using the new font family..
Change the Windows Terminal font face with settings.json
Alternatively, you can set a new default font face for the Terminal with the settings.json file.
1. Open the Setting page then select Open JSON file at the left bottom corner. Or you can press the Ctrl + Alt + , (comma) keyboard shortcut to open the settings.json file with the default code editor.
2. Under the profiles section, inside a profile brackets, for example PowerShell profile. Add this command to change the font face for this profile:
Note
Tip: If you have more than one line of code inside the bracket, ensure all the lines end with a comma (,) except for the last line. Otherwise, the settings may not save correctly.
3. Save the file then the font settings will apply automatically.