Windows常用

Windows常用

常用命令

1
# 命令行进入其他盘(如要进入D盘),输入 cd\ 确认后输入 D:

代理设置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 查看已设置代理(终端)
netsh winhttp show proxy
# 设置代理
netsh winhttp set proxy 127.0.0.1:7890
# 重置代理
netsh winhttp reset proxy

# powershell设置代理
$env:HTTP_PROXY="http://127.0.0.1:7890"
$env:HTTPS_PROXY="http://127.0.0.1:7890"
# cmd设置代理
set http_proxy=http://127.0.0.1:7890
set https_proxy=http://127.0.0.1:7890

# poweshell重置代理
$env:HTTP_PROXY=""
$env:HTTPS_PROXY=""
# cmd重置代理
set http_proxy=""
set https_proxy=""

winget

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# help 
winget --help

# 安装
winget install <app name or app id>

# 安装到指定路径
winget install <app name> -l C:\paths\paths

# 交互式软件安装,即在下载完成后,进入安装界面,手动进行安装
winget install <app name> -i

# 卸载
winget uninstall <app name>

# 更新升级
winget upgrade <app name>

# 显示已经安装的app
winget list

# 打开设置菜单
winget settings

# 设置json文件加入以下内容使得安装进度条可视化
"source": {
"autoUpdateIntervalInMinutes": 5
},
"visual": {
"progressBar": "rainbow"
},

# 查看某APP的详细信息
winget show <app name>

# 源相关命令
winget source add // 添加新源
winget source list // 列出当前源
winget source update // 更新当前源
winget source remove // 移除当前源
winget source reset // 重置源
winget source export // 导出源