Windows Terminal配置
C:\Users\xxx\AppData\Local\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState\settings.json
# 方式2
设置,左下角[打开JSON文件]
快捷键
# 打开设置
ctrl + ,
# 切换窗口
ctrl + tab
# 关闭所有窗口
alt f4
# 关闭当前窗口
ctrl + shifr + w
- 设置默认,启动cmd或powershell默认使用terminal
设置,启动,默认终端应用程序,选择 windows 终端
-
设置,默认值,外观,选择配色方案和字体,设置背景图像,或者不设置背景图像时将背景不透明度设为95%
-
缺省shell
如果要将cmd设定缺省shell,打开json文件,将defaultProfile设置为cmd.exe对应的guid
# 方式2
设置,启动,默认配置文件,保存
-
选中复制:打开json文件,修改 "copyOnSelect" 选项的值为 true
-
添加主题
# 主题推荐:https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/windowsterminal
# 直接复制json格式文本,打开json文件,添加到schemes数组内,保存后,在设置/配送方案中显示
{
"name": "Atom",
"black": "#000000",
"red": "#fd5ff1",
"green": "#87c38a",
"yellow": "#ffd7b1",
"blue": "#85befd",
"purple": "#b9b6fc",
"cyan": "#85befd",
"white": "#e0e0e0",
"brightBlack": "#000000",
"brightRed": "#fd5ff1",
"brightGreen": "#94fa36",
"brightYellow": "#f5ffa8",
"brightBlue": "#96cbfe",
"brightPurple": "#b9b6fc",
"brightCyan": "#85befd",
"brightWhite": "#e0e0e0",
"background": "#161719",
"foreground": "#c5c8c6"
}
- 使用主题
# 在profiles数组对应项中添加一行colorScheme,其值为添加主题的name字段值
# 没有指定主题name时,默认第一个;指定name后覆盖第一个
"profiles": [
{
"guid": "{xxx}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"colorScheme": "Atom"
}
]
- 动态配置文件
# 添加git
{
"name": "Git Bash",
"commandline": "C:\\Program Files\\Git\\bin\\bash.exe -li",
"icon": "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico",
"startingDirectory": "%USERPROFILE%"
}
# Anaconda3
{
"commandline": "%windir%\\System32\\cmd.exe \"/K\" C:\\ProgramData\\Anaconda3\\Scripts\\activate.bat C:\\ProgramData\\Anaconda3",
"guid": "{5151e974-42e9-5b8d-b35c-5422dbbc5f10}",
"icon": "C:\\ProgramData\\Anaconda3\\Menu\\anaconda-navigator.ico",
"name": "Anaconda3",
"startingDirectory": "%USERPROFILE%"
}
-
Anaconda Prompt(Anaconda3)路径
-
窗格
-
使用Alt+Shift++创建垂直窗格,使用Alt+Shift+-创建水平窗格
-
按住Alt并单击新选项卡按钮,拆分窗格
-
使用Ctrl+Shift+w关闭焦点窗格
-
重置
-
连接Linux,当前系统已安装OpenSSH客户端
ssh -p 22 user@xxx.xxx.xxx.xxx
- 配置mysql
{
"commandline": "C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql.exe mysql -u root -p",
"guid": "{69ef75a3-537d-46f8-aa50-c1b53259a2ea}",
"hidden": false,
"icon": "https://dogleftover.github.io/blog-beautify/icon/mysql.ico",
"name": "MySQL 8.0",
"startingDirectory": "%USERPROFILE%"
}
- 配置node
{
"commandline": "C:\\Windows\\System32\\cmd.exe /k \"C:\\Program Files\\nodejs\\nodevars.bat\"",
"guid": "{e208cb86-3de1-4206-a76f-1287b8fd4ca1}",
"hidden": false,
"icon": "https://dogleftover.github.io/blog-beautify/icon/Node.js.ico",
"name": "Node.js",
"startingDirectory": "%USERPROFILE%"
}
- 配置ssh连接
{
"commandline": "ssh root@192.168.110.101",
"guid": "{10bcf472-ccb8-4618-87d0-089bd293e195}",
"hidden": false,
"icon": "https://dogleftover.github.io/blog-beautify/icon/centos.ico",
"name": "vbox_centos7.6"
},
{
"commandline": "ssh root@192.168.110.120",
"guid": "{b166dc63-b87e-426f-a2ad-cadb1922d137}",
"hidden": false,
"icon": "https://dogleftover.github.io/blog-beautify/icon/kali.ico",
"name": "vbox_kali2024"
}