在 Windows Terminal 中添加 Git Bash
有了 Git Bash 让 Windows Terminal 功能更强大 。
win11 Windows Terminal 中添加 Git Bash
- 打开 Windows Terminal 的设置,选择“添加新的配置文件---复制 powershell 配置文件”
- 修改“名称、命令行、启动目录、图标”
修改后的效果图如下:
FAQ
- Git Bash 里的中文为乱码
- 打开
C:\Program Files\Git\etc\bash.bashrc
并在末尾添加: export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
- 重启终端即可正常显示中文
- 打开
如下图:
因为有些场景需要用到 Git Bash,所以需将其添加到 Windows Terminal 中,这样使用起来比较方便。
需具备以下条件:
安装了 Git,并知道 bash.exe 的位置,我的 bash.exe 位置在
D:\ProgramFiles\git\Git\bin
中有 git 的 logo,当然可以去git icon 下载
TIP
在 win10 ltsc 2019 中不能安装 windows terminal 所以更换为 Fluent Terminal
设置 git-bash 环境变量
将bash.exe
所在的目录添加到系统的 path 中,我这里的路径是D:\ProgramFiles\git\Git\bin
修改 Windows Terminal 配置文件
打开
Windows Terminal---点击tab栏中的下拉菜单---设置
就可以编辑 Windows Terminal 配置文件在
list:
代码块中添加:
{
"useAcrylic": true, // 是否开启透明度
"acrylicOpacity": 0.75, // 透明度
"colorScheme" : "rebecca", // 样式配置,这里使用的是我自定义的样式
"commandline": "bash.exe", // bash.exe的路径而不是git-bash.exe,用相对路径是因为在环境变量里设置了
// "fontFace": "Consolas", // 字体设置,需要下载所需的字体
"fontSize": 12, // 字体大小
"guid": "{6d0bd092-afa5-4845-a40c-8afb60f6cc46}", // 改一下 guid,可在powershell中输入New-Guid得到新的guid
"historySize": 9001, // 历史记录条数
"icon": "D:\\ProgramFiles\\git\\Git\\gwindows_logo.png", // git-bash的logo地址
"name": "git-bash", // tab栏的标题显示
"padding": "0, 0, 0, 0", // 终端内的文字距离周边的边距
"startingDirectory": "D:\\ProgramFiles\\vuepress", //启动后需要切换到哪个目录
"cursorColor": "#5757d9", // 光标颜色
"hidden": false
},
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
修改终端配色样式
在上面的配置中我使用了名为 rebecca 的样式,所以需要在 schemes 中进行自定义配色:
"schemes": [
// 终端样式设置
{
"name": "rebecca",
"black": "#12131e",
"red": "#dd7755",
"green": "#04dbb5",
"yellow": "#f2e7b7",
"blue": "#7aa5ff",
"purple": "#bf9cf9",
"cyan": "#56d3c2",
"white": "#e4e3e9",
"brightBlack": "#666699",
"brightRed": "#ff92cd",
"brightGreen": "#01eac0",
"brightYellow": "#fffca8",
"brightBlue": "#69c0fa",
"brightPurple": "#c17ff8",
"brightCyan": "#8bfde1",
"brightWhite": "#f4f2f9",
"background": "#292a44",
"foreground": "#e8e6ed"
}
],
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Windows Terminal profile-settings
另外还有一些其他的终端工具,如: Terminus(开源) 和 Termius(Pro 收费),这是两个不同的软件,有兴趣的可以看下。
最后贴上我的配置文件:
// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{6d0bd092-afa5-4845-a40c-8afb60f6cc46}", //此处用来设置默认打开哪个终端,默认是powershell,我这里改为默认启动git-bash
// You can add more global application settings here.
// To learn more about global settings, visit https://aka.ms/terminal-global-settings
// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,
// If enabled, formatted data is also copied to your clipboard
"copyFormatting": false,
// A profile specifies a command to execute paired with information about how it should look and feel.
// Each one of them will appear in the 'New Tab' dropdown,
// and can be invoked from the commandline with `wt.exe -p xxx`
// To learn more about profiles, visit https://aka.ms/terminal-profile-settings
"profiles": {
"defaults": {
// Put settings here that you want to apply to all profiles.
},
"list": [
{
"useAcrylic": true, // 是否开启透明度
"acrylicOpacity": 0.75, // 透明度
"colorScheme": "rebecca", // 样式配置,如果没有这个样式可以自行修改或者注释
"commandline": "bash.exe", // bash.exe的路径而不是git-bash.exe,用相对路径是因为在环境变量里设置了
// "fontFace": "Consolas", // 字体设置,需要下载所需的字体
"fontSize": 12, // 字体大小
"guid": "{6d0bd092-afa5-4845-a40c-8afb60f6cc46}", // 改一下 guid,可在powershell中输入New-Guid得到新的guid
"historySize": 9001, // 历史记录条数
"icon": "D:\\ProgramFiles\\git\\Git\\gwindows_logo.png", // git-bash的logo地址
"name": "git-bash", // tab栏的标题显示
"padding": "0, 0, 0, 0", // 终端内的文字距离周边的边距
"startingDirectory": "D:\\ProgramFiles\\vuepress", //启动后需要切换到哪个目录
"cursorColor": "#fff", // 光标颜色
"hidden": false
},
{
// Make changes here to the powershell.exe profile.
"useAcrylic": true, // 是否开启透明度
"acrylicOpacity": 0.75, // 透明度
"colorScheme": "cyberpunk",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false
},
{
// Make changes here to the cmd.exe profile.
"useAcrylic": true, // 是否开启透明度
"acrylicOpacity": 0.75, // 透明度
"colorScheme": "Banana Blueberry",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "命令提示符",
"commandline": "cmd.exe",
"hidden": false
},
{
"useAcrylic": true, // 是否开启透明度
"acrylicOpacity": 0.75, // 透明度
"colorScheme": "rebecca",
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
]
},
// Add custom color schemes to this array.
// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
"schemes": [
{
"name": "rebecca",
"black": "#12131e",
"red": "#dd7755",
"green": "#04dbb5",
"yellow": "#f2e7b7",
"blue": "#7aa5ff",
"purple": "#bf9cf9",
"cyan": "#56d3c2",
"white": "#e4e3e9",
"brightBlack": "#666699",
"brightRed": "#ff92cd",
"brightGreen": "#01eac0",
"brightYellow": "#fffca8",
"brightBlue": "#69c0fa",
"brightPurple": "#c17ff8",
"brightCyan": "#8bfde1",
"brightWhite": "#f4f2f9",
"background": "#292a44",
"foreground": "#e8e6ed"
},
{
"name": "cyberpunk",
"black": "#000000",
"red": "#ff7092",
"green": "#00fbac",
"yellow": "#fffa6a",
"blue": "#00bfff",
"purple": "#df95ff",
"cyan": "#86cbfe",
"white": "#ffffff",
"brightBlack": "#000000",
"brightRed": "#ff8aa4",
"brightGreen": "#21f6bc",
"brightYellow": "#fff787",
"brightBlue": "#1bccfd",
"brightPurple": "#e6aefe",
"brightCyan": "#99d6fc",
"brightWhite": "#ffffff",
"background": "#332a57",
"foreground": "#e5e5e5"
},
{
"name": "Banana Blueberry",
"black": "#17141f",
"red": "#ff6b7f",
"green": "#00bd9c",
"yellow": "#e6c62f",
"blue": "#22e8df",
"purple": "#dc396a",
"cyan": "#56b6c2",
"white": "#f1f1f1",
"brightBlack": "#495162",
"brightRed": "#fe9ea1",
"brightGreen": "#98c379",
"brightYellow": "#f9e46b",
"brightBlue": "#91fff4",
"brightPurple": "#da70d6",
"brightCyan": "#bcf3ff",
"brightWhite": "#ffffff",
"background": "#191323",
"foreground": "#cccccc"
}
],
// Add custom actions and keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
"actions": [
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
// To learn more about selection, visit https://aka.ms/terminal-selection
{ "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+c" },
{ "command": "paste", "keys": "ctrl+v" },
// Press Ctrl+Shift+F to open the search box
{ "command": "find", "keys": "ctrl+shift+f" },
// Press Alt+Shift+D to open a new pane.
// - "split": "auto" makes this pane open in the direction that provides the most surface area.
// - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
// To learn more about panes, visit https://aka.ms/terminal-panes
{
"command": {
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"keys": "alt+shift+d"
}
]
}
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
修改 vscode 默认终端
vscode 默认的终端不满足我的要求,所以想将其替换成 git bash
在 vscode 中依次选择
文件->首选项->设置
,打开设置搜索 terminal.integrated.shell.windows,打开 settings.json 编辑
- 修改为 git bash 所在的路径
- 重启终端。
修改微软商店默认存储位置
众所周知默认情况下从微软商店安装的应用都安装到 C 盘,为了减轻 C 盘压力,需要修改微软商店的默认存储位置。
- 打开设置,系统,存储
- 修改为 D 盘或者其他盘,点击应用
点击应用后会在 D 盘生成一个名为 WindowsApps 的目录,这里就是以后用来存放从微软商店安装的应用的位置了。
windows 包管理器 Scoop
使用 scoop 让我们可以像在 linux 中一样使用命令安装软件.
scoop install git
msdn-win10 版本说明
consumer_editions 版本包含:Home(家庭版); Education(教育版) ; Professional(专业版);
business_editions 版本包含:Education(教育版); Enterprise (企业版); Professional(专业版);
cn_windows_10_enterprise_ltsc_2019:无Edge浏览器、小娜,应用商店,更新频率小,可选是否下载和安装补丁,其它版都不能自选补丁。
Windows 10 各版本区别:
家庭版(Home):供家庭用户使用,无法加入Active Directory和Azure AD,不允许远程链接
专业版(Professional):供小型企业使用 在家庭版基础上增加了域账号加入、bitlocker、企业商店等功能
企业版(Enterprise):供中大型企业使用 在专业版基础上增加了DirectAccess,AppLocker等高级企业功能
教育版(Education):供学校使用 (学校职员, 管理人员, 老师和学生) 其功能基本和企业版的一样
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Win10 各版本详细区别
主要介绍 win10 各版本的功能及差异。
Windows 10 企业版
和教育版功能一样,功能最完整版本
核心功能
①熟悉,更好用:自定义开始菜单,Windows Defender 与Windows防火墙,Hiberboot与InstantGo,系统启动更快速,TPM支持,节电模式,Windows更新
②Cortana小娜:更自然的语音和按键输入,主动、个性化建议,提醒,从网络、本地以及云中搜索,无需动手,直接喊出“你好,小娜”即可激活
③Windows Hello:指纹识别,面部和虹膜识别,企业级安全
④多任务操作:虚拟桌面,Snap协同(同一屏幕最多支持显示4个应用),跨不同显示器的Snap功能支持
⑤Microsoft Edge:阅读视图,内置墨水书写支持,整合Cortana小娜
2
3
4
5
6
7
8
9
企业特性
①基础功能:设备加密,加入域功能,组策略管理器,Bitlocker加密,企业模式Internet Explorer浏览器(EMIE),Assigned Access 8.1(访问分配),远程桌面,Direct Access(直接访问),Windows To Go创建工具,Applocker(应用程序锁定),BranchCache(分支缓存),可通过组策略控制的开始屏幕,
②管理部署功能:企业应用旁加载功能,移动设备管理,可加入到Azure活动目录,单点登录到云托管应用,Win10企业商店,粒度UX控制,可轻松从专业版升级到企业版
③安全:Microsoft Passport登录,企业数据保护,凭据保护,设备保护
④Windows即服务:Windows更新,Windows Update for Business,Current Branch for Business(用于企业的当前更新分支)
2
3
4
5
6
7
Windows 10 教育版
与企业板功能一致,授权方式不同,可轻松从家庭版升级到教育版,(经过测试专业版也可以通过输入教育版 key 升级到教育版)
Windows 10 专业版
与企业版对比【无】以下功能:
①基础功能:Direct Access(直接访问),Windows To Go创建工具,Applocker(应用程序锁定),BranchCache(分支缓存),可通过组策略控制的开始屏幕,
②管理部署功能:粒度UX控制
③安全:凭据保护,设备保护
2
3
4
5
Windows 10 家庭版
与专业版对比【无】以下功能:
①基础功能:加入域功能,组策略管理器,Bitlocker加密,企业模式Internet Explorer浏览器(EMIE),Assigned Access 8.1(访问分配),远程桌面,Direct Access(直接访问),Windows To Go创建工具,Applocker(应用程序锁定),BranchCache(分支缓存),可通过组策略控制的开始屏幕,
②管理部署功能:可加入到Azure活动目录,单点登录到云托管应用,Win10企业商店,粒度UX控制,可轻松从专业版升级到企业版
③安全:企业数据保护,凭据保护,设备保护
④Windows即服务:Windows Update for Business,Current Branch for Business(用于企业的当前更新分支)
2
3
4
5
6
7
win10 激活
真正有效的 win10 企业版秘钥: H8PDJ-H4NKW-3GKH7-YHKJ7-4C2JR
另外可尝试如下方法:
# 此方式激活有效期为180天
slmgr /ipk DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ
slmgr /skms xykz.f3322.org
slmgr /ato
slmgr /ipk YYVX9-NTFWV-6MDM3-9PT4T-4M68B
slmgr /skms kms.03k.org
slmg /ato
slmgr /skms 127.0.0.1
查询是否激活: slmgr.vbs -xpr 或者 slmgr.vbs -dlv
卸载产品密钥: slmgr /upk
清除系统密钥管理服务和计算机名称: slmgr /ckms
重置计算机的受权状态: slmgr /rearm
重启电脑
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
另外可使用hwidgen
工具进行激活,其支持的版本及激活方式如下:
左边是 win 版本,右边是支持的激活方式。
Core (Home) (N) (HWID/KMS38)
CoreSingleLanguage (N) (HWID/KMS38)
Professional (N) (HWID/KMS38)
ProfessionalEducation (N) (HWID/KMS38)
ProfessionalWorkstation (N) (HWID/KMS38)
Education (N) (HWID/KMS38)
Enterprise (N) (HWID/KMS38)
EnterpriseS (N) 2015(HWID)
EnterpriseS (N) 2016 (HWID/KMS38)
EnterpriseS (N) 2019 (KMS38)
ServerStandard(Core) (N) (KMS38)
ServerDatacenterCore) (N) (KMS38)
ServerSolution(Core) (N) (KMS38)
windows 将分区转换为 GPT 格式
如有重要文件请提前备份。
1: 重装系统时,按键SHIFT + F10
然后输入diskpart
2: 通过list disk
查询现有磁盘编号
3: 通过select disk
选择需要转换格式的磁盘,如: select disk 0
4: 通过clean
清除所有文件
5: 通过convert gpt
即可转换分区为 GPT 格式。
修改系统为 uefi 方式启动
首先需确认系统的引导方式是 MBR 还是 UEFI 引导。
有两种方法,选一即可:
1: WIN + R
打开运行,输入msinfo32
,查看系统信息,在BIOS模式
中如果显示传统
,则是 MBR,如果结果为UEFI
,则为 UEFI 启动。
2: 以管理员身份打开 cmd,输入bcdedit
,找到 windows 启动加载器的path
,如果结果后缀是.exe
格式则为 MBR 引导,如果结果后缀是.efi
则是 UEFI 引导。
如果是上面的结果是通过 MBR 引导还需在BIOS里将启动方式修改为UEFI
,每个主机的 BIOS 都可能不一样,请自行查找资料进行修改。
win10 创建开始菜单磁贴
1: 先找到你的程序执行文件的路径,然后发送到桌面快捷方式
,
2: 将上面创建好的快捷方式移动到C:\ProgramData\Microsoft\Windows\Start Menu\Programs
中即可。
win10 ltsc 2019 添加微软商店
因为我想在 win10 ltsc 中安装 windows Terminal,通过源码安装不了,只能通过微软商店安装,而 win10 ltsc 默认不安装微软商店。
解决办法:
1: 去https://store.rg-adguard.net/
以 PackageFamilyName 方式搜索 Microsoft.WindowsStore_8wekyb3d8bbwe
下载所需的安装包。
2: 在 powershell 中 cd 到安装包所在的目录并输入Add-AppxPackage *
3: WSReset.exe
清空微软商店缓存。
另外还有一种方法,但我没有试。
vscode 常用插件
Auto Close Tag
Auto Rename Tag
Beautify
Community Material Theme
ESLint
HTML Snippets
Live Server
Markdown All in One
Prettler
shell-format
Vetur
VSCode Great Icons
2
3
4
5
6
7
8
9
10
11
12
windows explorer 直接显示分区
在桌面上创建一个快捷方式,然后改名为explorer
,修改其目标改为C:\Windows\explorer.exe ,
win10 释放 c 盘空间
1: 清理系统垃圾
2: 更改虚拟内存存储路径,关闭休眠文件等
Hiberfil.sys 休眠文件是 Windows 休眠时用于向磁盘写入内存内容的
Pagefile.sys 页面文件是用于在操作系统内存不足时临时交换数据的
swapfile.sys 文件主要用于交换 Universal Apps 的相关数据
修改虚拟内存存储路径:
重启后生效。
3: swapfile.sys 和 Hiberfil.sys 是否能删除
Hiberfil.sys
休眠文件和swapfile.sys
我不选择删除,因为其作用就是加速应用启动速度的,win10 的快速启动也是和这相关,建议不要删除。
如果想删除,可利用管理员身份打开 cmd 并在里面输入powercfg -h off
即可删除休眠文件。
开启休眠文件: powercfg -h on
另外还可通过POWERCFG /HIBERNATE /SIZE nn
可压缩休眠文件。
说明:“nn”是压缩百分比,可输入 50 ~ 100 之间的整数
win10 中配置多个 jdk
安装多个 jdk 在这里不多说了,需要注意的是 jdk1.11 不用安装 jre 了,而 jdk1.8 需要安装 jre。
安装后的路径:
接下来就是配置环境变量了,虽然安装了多个 jdk,但想要切换 jdk 只能通过修改 JAVA_HOME 目录路径来生效。
安装完 jdk1.11 后会在环境变量中添加
C:\Program Files\Common Files\Oracle
C:\Program Files\Common Files\Oracle\Java\javapath
2
3
这将设置默认的 jdk 版本为 1.11,即使通过修改 JAVA_HOME 目录路径也不能实现切换 jdk 的目的。
所以需要将C:\Program Files\Common Files\Oracle
这个目录删除,
另外还需将环境变量中C:\Program Files\Common Files\Oracle
相关的两条数据删除。
设置 jdk 环境变量
新建JAVA_HOME
环境变量,其值为 jdk 的安装目录,D:\programFiles\java\jdk1.8u271
新建CLASSPATH
环境变量,其值为.;%JAVA_HOME%\lib\tools.jar; %JAVA_HOME%\lib\dt.jar
在PATH
中添加如下内容:
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin
2
3
通过修改 JAVA_HOME 路径实现切换效果:
Windows Terminal + tssh + starship + msys2
SSH 客户端
- windterm 半开源
- powershell7 自带 ssh 及 scp
- xshell
- secureCRT
- MobaXterm
- Putty
- finalshell
- tabby
- warp
- vs code + remote-ssh
- termius
- gitBash(MinGW64)
- MSYS2
文件传输
- FileZilla
- WinSCP
- lrzsz
- trzsz
- XFTP
持续输出
- screen
- tmux
解决方案
- Windows Terminal + tssh + starship, 支持文件拖拽 (推荐)
配置文件管理
- dotfiles
终端配置
- 提示符配置: starship
其它
- nvim
- lazygit
Windows Terminal 中添加 MSYS2
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [],
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{5dc1f56a-4838-4e39-b467-2297d058f0ed}",
"keybindings": [
{
"id": "Terminal.CopyToClipboard",
"keys": "ctrl+c"
},
{
"id": "Terminal.PasteFromClipboard",
"keys": "ctrl+v"
},
{
"id": "Terminal.FindText",
"keys": "ctrl+shift+f"
},
{
"id": "Terminal.DuplicatePaneAuto",
"keys": "alt+shift+d"
}
],
"newTabMenu": [
{
"type": "remainingProfiles"
}
],
"profiles": {
"defaults": {
"startingDirectory": "D:\\workFiles"
},
"list": [
{
"colorScheme": "One Half Dark",
"commandline": "D:\\Program Files\\tssh\\tssh.exe",
"guid": "{c90c432f-b925-4070-930c-f00f154bc1b4}",
"hidden": false,
"icon": "D:\\Program Files\\tssh\\tssh.png",
"name": "T-SSH",
"startingDirectory": "%USERPROFILE%"
},
{
"colorScheme": "Campbell Powershell",
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore",
"startingDirectory": "D:\\workFiles"
},
{
"commandline": "%SystemRoot%\\System32\\cmd.exe",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"icon": null,
"name": "\u547d\u4ee4\u63d0\u793a\u7b26"
},
{
"altGrAliasing": true,
"antialiasingMode": "grayscale",
"closeOnExit": "automatic",
"colorScheme": "One Half Dark",
"commandline": "C:\\Program Files\\Git\\bin\\bash.exe",
"cursorShape": "bar",
"experimental.retroTerminalEffect": false,
"font": {
"face": "Cascadia Mono",
"size": 12
},
"guid": "{aeea32a0-faea-4c2a-871b-0c7fb952a173}",
"hidden": false,
"historySize": 9001,
"icon": "C:\\Program Files\\Git\\Git-Icon-1788C.png",
"name": "GitBash",
"padding": "8, 8, 8, 8",
"snapOnInput": true,
"startingDirectory": "D:\\workFiles",
"tabTitle": "Git Bash",
"useAcrylic": false
},
{
"altGrAliasing": true,
"antialiasingMode": "grayscale",
"closeOnExit": "automatic",
"colorScheme": "One Half Dark",
"commandline": "D:\\workFiles\\Apps\\msys2\\msys2_shell.cmd -defterm -ucrt64 -no-start -here",
"cursorShape": "bar",
"font": {
"face": "Cascadia Mono",
"size": 12
},
"guid": "{5dc1f56a-4838-4e39-b467-2297d058f0ed}",
"hidden": false,
"historySize": 9001,
"icon": "D:\\workFiles\\Apps\\msys2\\ucrt64.ico",
"name": "MSYS2-UCRT",
"padding": "8, 8, 8, 8",
"snapOnInput": true,
"tabTitle": "MSYS2-UCRT",
"useAcrylic": false
},
{
"colorScheme": "Campbell Powershell",
"commandline": "D:\\workFiles\\Apps\\msys2\\ucrt64.exe",
"guid": "{05299c5e-4562-4ea3-9440-ed3dc966d032}",
"hidden": false,
"icon": "ms-appx:///ProfileIcons/pwsh.png",
"name": "PowerShell (\u590d\u5236)",
"startingDirectory": "D:\\workFiles"
}
]
},
"schemes": [],
"themes": []
}
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
使 starship 在 msys2-ucrt 中生效
打开 msys2-ucrt 终端然后通过 pacman -Sy && pacman -S vim
安装 vim ,用 vim ~/.bashrc
编辑 bash 配置,添加 eval "$(starship init bash)"
前提是要让 msys2 获取到 starship 的环境变量,可在 windows 环境变量配置中添加 MSYS2_PATH_TYPE
的配置,其值为 inherit
也可通过删除掉 D:\\workFiles\\Apps\\msys2\\msys2_shell.cmd
中 rem set MSYS2_PATH_TYPE=inherit
里的 rem 来实现
SSH 配置文件
# gitee
Host gitee
HostName gitee.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_minio
# github
Host github
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_github
# minio/pi
Host pi
HostName 192.168.5.20
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_minio
# ubuntu2204
Host ubuntu2204
HostName 192.168.56.96
Port 51888
User echoxu
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_vagrant
#EnableDragFile Yes
#DragFileUploadCommand trz -y
# ocis
Host ocis
HostName 192.168.56.107
Port 51888
User echoxu
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_vagrant
# centos7.9
Host centos7.9
HostName 192.168.56.95
Port 51888
User echoxu
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_vagrant
# MySQL-192.168.56.80
Host 192.168.56.80
HostName 192.168.56.80
Port 51888
User echoxu
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_vagrant
# MySQL-192.168.56.81
Host 192.168.56.81
HostName 192.168.56.81
Port 51888
User echoxu
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_vagrant
# MySQL-192.168.56.82
Host 192.168.56.82
HostName 192.168.56.82
Port 51888
User echoxu
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_vagrant
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76