[TOC]
# 獲取最新
以管理員權限運行下面命令:
## 安裝 [Windows Terminal](https://github.com/microsoft/terminal/releases) 最新版本
```
scoop install -g extras/windows-terminal
```
# 管理員權限 gsudo
[gsudo](https://github.com/gerardog/gsudo) 是 Windows 的 sudo 等效項,具有與原始 Linix sudo 相似的用戶體驗。 它允許在當前控制臺窗口或新控制臺窗口中以提升的權限運行命令,或提升當前外殼程序。
有些命令運行需要管理員權限, 但是 Windows terminal 默認是非管理員打開的
```
gsudo config # 顯示當前用戶設置。
gsudo config {key} ["value" | --reset] # 讀取、寫入或重置用戶設置為默認值
gsudo config prompt $p$g # 設定提示字元的指令
gsudo status #顯示有關當前用戶、安全性、完整性級別或其他 gsudo 相關數據的狀態信息
```
# 快捷鍵
| 快捷鍵 | 描述 |
| --- | --- |
| ctrl + , | 打開配置 |
| ctrl + shift + , | 打開JSON配置 |
| ctrl + shift + w | 關閉窗口 |
| alt + shift + d | 自動分屏 |
| ctrl + shift + f | 查找內容 |
| alt + enter | 切換全屏 |
| ctrl + shift + space | 打開下拉菜單 |
| ctrl + shift + t | 新建選項卡 |
| ctrl + tab | 切換選項卡 |
| **alt + shift + -** | 垂直拆分窗格 |
| **alt + shift + +** | 水平拆分窗格 |
| alt + 方向鍵 | 移動窗格焦點 |
| alt + shift + 方向鍵 | 調整窗格大小 |
| ctrl + shift + c | 復制內容到剪貼板 |
| ctrl + shift + v | 粘貼剪貼板上復制的內容 |
# 配置文件設置
Windows 終端中的命令行工具或者 shell 程序的配置文件。如果希望將某個設置應用于所有配置文件,可以將其添加到 `settings.json` 文件中的配置文件列表上方的`defaults`部分。
~~~json
"defaults": {
// 設置應用于所有的配置文件
},
"list": [
// 配置文件列表
]
~~~
# 加入右鍵
直接使用腳本 [GitHub - lextm/windowsterminal-shell: Install/uninstall scripts for Windows Terminal context menu items (fastgit.org)](https://hub.fastgit.org/lextm/windowsterminal-shell/)
# alias
# 自定義的終端工具或命令
# 參考
[windows terminal添加自定義的終端工具或命令](https://www.cnblogs.com/wan--wan/p/13925672.html)
[Windows 終端啟動設置 | Microsoft Docs](https://docs.microsoft.com/zh-cn/windows/terminal/customize-settings/startup#launch-on-machine-startup)