PowerShell modified pit recording and Set-Culture and the regional language settings cmd / powershell console code page fundamental solution

Article Directory

Foreword

Half a day, and finally climb out of the pit ...

It must first clear a concept shortcut to open the powershell and found his open powershell c root directory are two different things!

Each shortcut has its own set of attributes, such as code page, color

Changed but there is no shortcut for it influence the root directory!

Start Menu has a PowerShell,
win the X-+ There are two,
the root of a

Open Explorer,

% LocalAppdata% \ Microsoft \ Windows \ WinX

Here Insert Picture Description

In group3, the
Here Insert Picture Description

This is win + x two in two, if you delete or rename, win + x Open will be prompted to find, if replaced with other links will be able to find only reserved

Two related interpretation of the connection https://www.h404bi.com/blog/2019/02/understanding-windows-console-host-settings

the second

Linux modified class

Administrator rights to open ps!

Install dependencies

Install-Module posh-git -Scope CurrentUser

Installation oh-my-posh

Install-Module oh-my-posh -Scope CurrentUser

Ps edit the configuration file (if not the new), $ profile is the path

vim $profile 
若没有vim则notepad

Written in the configuration file

Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox

Here Insert Picture Description

If the directory has a strange character that is garbled, the need to use powerline font,

Other tutorials say a variety of fonts to download and install very troublesome, where more yarn with Microsoft fonts, application store to download and install a key After setting the thing!

https://www.microsoft.com/en-us/p/%E6%9B%B4%E7%BA%B1%E9%BB%91%E4%BD%93/9mw0m424ncz7#activetab=pivot:overviewtab

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

Pit

Back up down

C:\WINDOWS\system32> Get-WinSystemLocale

LCID             Name             DisplayName
----             ----             -----------
2052             zh-CN            中文(简体,中国)

Powershell installed before the plug does not recognize the font, that is the coding problem, the operation of set-culure = en-US
after the restart, calendar, e-mail and so became the English, but the whole language system but still Chinese, and indeed the root directory powershell It turned into English, but non-powerline font garbage problem is not resolved, wasted a long time

Here Insert Picture Description

It says so much, and change the registry code page is the root of the reform, the code page shortcut is not changed, and we are unable to manually change,

This is to be changed to utf-8, but the overall UI interface console includes all the English.

Here Insert Picture Description

Published 160 original articles · won praise 146 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_44510468/article/details/104681859