Windows 使用经验积累
本文主要介绍了 Windows 使用经验积累,包括一些基础内容(系统快捷键、键盘符号),环境变量、Host 文件修改、输入法设置搜狗双拼以及一些常见问题的解决方法。
Windows 基础
使用速记
已安装包管理工具:
choco,wget, winget
在
Windows Terminal
的$PROFILE
中自定义路径:
1 | # custom path |
系统快捷键
键盘符号
There are special symbols on U.S. keyboards. The following characters are accessed by shortcuts or special symbols.
This table shows the special symbol names and how to show them with Mac shortcuts.
Keyboard Symbols | Symbols Names |
---|---|
` | grave, grave accent, backtick, back quote |
~ | tilde |
! | exclamation mark, exclamation point, bang |
@ | at, at sign, at symbol |
# | pound, hash, number |
$ | dollar(s) |
% | percent, percent sign, parts per 100 |
^ | carat, hat, circumflex, exponent symbol |
$ | and, ampersand |
* | asterisk, star |
( | open parenthesis, left parenthesis |
) | close parenthesis, right parenthesis |
() | parentheses, round brackets |
- | hyphen, minus, minus sign, dash |
_ | underscore |
= | equals, equal sign |
+ | addition, plus sign |
[ | open bracket |
] | close bracket |
[] | brackets, square brackets |
{ | open brace |
} | close brace |
{} | braces, curly brackets |
\ | backslash, backward slash |
| | vertical pipe, pipe |
; | semicolon |
: | colon |
‘ | apostrophe, prime, single quote |
“ | quotation mark, double quotes |
, | comma |
. | period, decimal, dot |
/ | slash, forward slash |
< | less than |
> | greater than |
? | question mark |
在目标文件夹和源文件夹之间建立软链
以管理员权限运行 Command Prompt
, 在目标文件夹和源文件夹之间建立软链。
1 | mklink /d "C:\Users\xxxxx\OneDrive - sjtu.edu.cn\Life\Pictures" "C:\Users\xxxxx\Pictures" # Laptop 上的照片备份 |
Windows 环境变量
分为用户变量和系统变量:System variables are shared for all users, but user variables are only for your account/profile.
What is the difference between user variables and system variables?
查看系统环境变量
查看所有环境变量
1
2Get-ChildItem -Path Env:
dir env:查看某一个环境变量的值
1
2Get-ChildItem -Path Env:\POSH_THEMES_PATH
$env:POSH_THEMES_PATH如果一个环境变量有多个值,可以使用 split 分开
1
2$env:PSModulePath -split ';'
$env:PATH -split ';':
环境变量备份
下面的两个注册表项:第一个代表系统/全局环境变量,第二个代表用户环境变量。使用注册表管理器导出即可以备份。
1 | HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment |
删除重复环境变量
以管理员权限运行 ps 1 文件,删除重复项:
1 | powershell.exe -NoProfile -ExecutionPolicy Bypass -File RemoveDupfromPATH.ps1 |
Windows 基于 Host 屏蔽网站
修改 Host 文件并使其立即生效:
- Win + R
- 定位到 host 文件
- 更改并保存
- Win + R
- Cmd
- Ipconfig /flushdns
Windows 输入法设置搜狗双拼
- 搜狗双拼键位
- 添加双拼方案
- 编辑方案 (更新之后的模板需要选择 微软双拼)
Windows 移除右键已卸载项
How to Remove Apps from the “Open With” List in Windows - Make Tech Easier
PowerToys Run Open PowerShell
当使用 PowerToys Run 开启 PowerShell 的时候,启动的路径是继承的 PowerToys 的目录,所以找不到很多系统的组件。
Powershell $env:path changing depending on how it is opened (PowerToys Run)?
Windows 常见问题与解决方案
Windows 扩展卷无法使用
用扩展卷的方式给 C 盘增加空间—扩展卷无法使用,这是由于需要扩展的空间和 C 盘未直接相邻。
- 打开 cmd,输入 diskpart 并回车。
- 输入 list disk 并回车查看磁盘。
- 输入 select disk n 选择 C 盘所在磁盘。
- 输入 list partition 并回车查看分区。
- 输入 select partition n 选择中间的恢复分区。
- 输入 delete partition override 删除分区,扩展卷功能可正常使用。
Windows Process Exited with Code 1 已退出进程代码为 1
Press Win+R to open the Run prompt.
Type regedit > press the Enter button > click the Yes button.
Navigate to this path:
1
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
Right-click on the Autorun String value and select Delete.
Click on the Yes button.
Restart your computer and enter the same command.
Fix Process exited with code 1 error in Windows Terminal, PowerShell or CMD
Windows 个人文件夹路径混乱修复和恢复默认设置
- Win+R
- Regedit
- Find User Shell Folders
- Edit the wrong items
Windows 使用经验积累