10

I'm new to Windows 10, having spent a lot of time on Mac OS X and some on Ubuntu, and I've read a lot about the types of things that are good to put in the settings.json file for my PowerShell, but I can't seem to find anything that tells me where this file resides.

For example, the "Set up Powerline in PowerShell" section in this Microsoft document tells you to edit your settings.json file (specifically in the subsection titled "Set Cascadia Code PL as fontFace in settings"), and points you to this document telling you about the layout of this file, but it doesn't seem to tell you where to find it!

In case the subsection gets changed, this is the first two paragraphs of that section:

To set the Cascadia Code PL font for use with PowerLine (after downloading, unzipping, and installing on your system), you will need to open your profile settings in your settings.json file by selecting Settings (Ctrl+,) from your Windows Terminal drop-down menu.

Once your settings.json file opens, find the Windows PowerShell profile and add: "fontFace": "Cascadia Code PL" to designate Cascadia Code PL as the font. This will provide those nice Cascadia Code Powerline glyphs. You should notice the change in your terminal as soon as you select Save in your editor.

Where is the settings.json file?

7
  • why do you think there is a Settings.JSON file for powershell? i've never seen such. settings for PoSh are usually in the $Profile files that are/is being run. take a look at Get-Help about_Profiles.
    – Lee_Dailey
    Commented Sep 23, 2020 at 15:08
  • @BenHocking You are getting mixed up. The link you have in your question is for Windows Terminal
    – Paolo
    Commented Sep 23, 2020 at 15:12
  • @Paolo See the section titled "Set up Powerline in PowerShell". I edited the question to make that clearer. Commented Sep 23, 2020 at 15:12
  • settings.json is only mentioned here learn.microsoft.com/en-us/windows/terminal/customize-settings/… and again, as you can see, it talks about Windows Terminal
    – Paolo
    Commented Sep 23, 2020 at 15:14
  • @BenHocking - the link referring to the settings file is for the windows terminal app, not for powershell. the article is quite misleadingly worded. [grin]
    – Lee_Dailey
    Commented Sep 23, 2020 at 15:38

1 Answer 1

11

You can find the location of the settings.json file with the following Powershell commands:

$settings = (Get-Item "C:\users\$env:UserName\AppData\Local\Packages\Microsoft.WindowsTerminal_*\LocalState\settings.json")
$settings.DirectoryName

To open it from the Windows Terminal directly:

  1. Ctrl + ,
  2. Edit the settings.json file.
  3. Save settings.json file.
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.