Windows Terminal配置

  • 一、安装
  • 二、默认终端配置
  • ~~三、配置在当前文件打开终端~~(现在安装之后好像Terminal之后好像是自动配置的,不用人工配置)
    • 1、右键打开
    • 2、设置打开Terminal为当前目录
  • 四、主题
  • 五、完整版配置文件

最近在windows上用安装了centos子系统,并配置了Windows Terminal,记录一下过程。

一、安装

​ 因为重点是在配置Windows Terminal,所以这点就忽略了,直接在微软商店下载安装centos与Terminal

​ 记得在 控制面板->程序->启用或关闭windows功能下将适用于Linux的windows子系统勾选

二、默认终端配置

在安装后Windows Terminal之后,打开默认是cmd终端,现在配置为打开默认子系统centos
打开Windows Terminal设置(json格式)
这里贴出一部分主要配置

"defaultProfile": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}","profiles":{"defaults":{// Put settings here that you want to apply to all profiles."acrylicOpacity": 0.1, //背景透明度(0-1)"colorScheme": "Breeze", //主题名字//"fontFace": "Fira Mono for Powerline","fontFace": "DejaVu Sans Mono for Powerline","fontSize": 13},"list":[{// Make changes here to the powershell.exe profile."guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}","name": "Windows PowerShell","commandline": "powershell.exe","hidden": false},{// Make changes here to the cmd.exe profile."guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}","name": "Command Prompt","commandline": "cmd.exe","hidden": false},{"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}","hidden": false,"name": "Ubuntu","source": "Windows.Terminal.Wsl"},{"guid": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}","hidden": false,"name": "CentOS","source": "Windows.Terminal.Wsl","startingDirectory" : "."},{"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}","hidden": false,"name": "Azure Cloud Shell","source": "Windows.Terminal.Azure"}]},

defaults表示默认配置,即每个中的都会采取的配置(cmd、powershell或者是子系统shell)
defaultProfile表示当前的默认打开终端,值是一串数字,是终端的guid
list中就是每个终端的信息
要更改默认终端,将defaultProfile修改为list中想要的终端的guid值即可
如上,我现在的默认终端是CentOS,将defaultProfile修改为{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}即可

三、配置在当前文件打开终端(现在安装之后好像Terminal之后好像是自动配置的,不用人工配置)

实现如下功能:
右键->打开终端,终端路径是当前位置

1、右键打开

将以下图标下载,放入以下文件夹中(没有就新建)
C:\Users\tomorrow\AppData\Local\terminal
tomorrow 是用户名,需要改成自己的用户名

将图标名字修改为terminal.ico

新建文本文件

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows terminal here"
"Icon"="%USERPROFILE%\\AppData\\Local\\terminal\\terminal.ico"[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="C:\Users\tomorrow\AppData\Local\Microsoft\WindowsApps\wt.exe"

依然将最后一句的tomorrow改为自己用户名
完成后命名为terminal.reg 双击即可
此时右键可以代打开terminal

2、设置打开Terminal为当前目录

在配置文件中配置,只需要添加一个字段startingDirectory便可
可以在默认的defaults中添加,也可以在list中对应的终端配置添加,我这里是后者

            {"guid": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}","hidden": false,"name": "CentOS","source": "Windows.Terminal.Wsl","startingDirectory" : "."}

添加了 “startingDirectory” : “.” 此时右键打开便是当前目录

四、主题

Windows Terminal Themes
网站有很多主题,选择喜欢的,将配置复制下面,放入自己的配置
如我的配置如下:

"schemes": [{"name": "Breeze","black": "#31363b","red": "#ed1515","green": "#11d116","yellow": "#f67400","blue": "#1d99f3","purple": "#9b59b6","cyan": "#1abc9c","white": "#eff0f1","brightBlack": "#7f8c8d","brightRed": "#c0392b","brightGreen": "#1cdc9a","brightYellow": "#fdbc4b","brightBlue": "#3daee9","brightPurple": "#8e44ad","brightCyan": "#16a085","brightWhite": "#fcfcfc","background": "#31363b","foreground": "#eff0f1"}],

再在defaults字段中的colorScheme填上主题名

 "defaults":{// Put settings here that you want to apply to all profiles."acrylicOpacity": 0.1, //背景透明度(0-1)"colorScheme": "Breeze", //主题名字//"fontFace": "Fira Mono for Powerline","fontFace": "DejaVu Sans Mono for Powerline","fontSize": 13},

五、完整版配置文件

仅供参考

// This file was initially generated by Windows Terminal 1.4.3243.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": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}",// 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."acrylicOpacity": 0.1, //背景透明度(0-1)"colorScheme": "Breeze", //主题名字//"fontFace": "Fira Mono for Powerline","fontFace": "DejaVu Sans Mono for Powerline","fontSize": 13},"list":[{// Make changes here to the powershell.exe profile."guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}","name": "Windows PowerShell","commandline": "powershell.exe","hidden": false},{// Make changes here to the cmd.exe profile."guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}","name": "Command Prompt","commandline": "cmd.exe","hidden": false},{"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}","hidden": false,"name": "Ubuntu","source": "Windows.Terminal.Wsl"},{"guid": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}","hidden": false,"name": "CentOS","source": "Windows.Terminal.Wsl","startingDirectory" : "."},{"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": "Breeze","black": "#31363b","red": "#ed1515","green": "#11d116","yellow": "#f67400","blue": "#1d99f3","purple": "#9b59b6","cyan": "#1abc9c","white": "#eff0f1","brightBlack": "#7f8c8d","brightRed": "#c0392b","brightGreen": "#1cdc9a","brightYellow": "#fdbc4b","brightBlue": "#3daee9","brightPurple": "#8e44ad","brightCyan": "#16a085","brightWhite": "#fcfcfc","background": "#31363b","foreground": "#eff0f1"}],// 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" }]
}

Windows Terminal配置相关推荐

  1. Windows Terminal 配置GIT

    Windows Terminal 配置GIT 一.打开设置 找到该位置 json串中添加以下代码 {"acrylicOpacity": 0, // 透明度"closeOn ...

  2. Windows Terminal配置Git

    文章目录 Windows Terminal配置Git 效果 下载和安装 配置Windows Terminal 配置其它命令行 Windows Terminal配置Git 效果 先上效果图: 下载和安装 ...

  3. 我的Windows Terminal 配置(带注释,附配置文件下载)

    Windows Terminal 配置(带注释,附配置文件下载,更新于2020.5.3) 前言 详细配置(更新于2020.05.03) 前言 windows terminal的确是好用之极的终端工具, ...

  4. Windows Terminal 配置文件+图形化配置界面+右键菜单+管理员权限

    Windows Terminal 配置 Windows Terminal 是一个面向命令行工具和 shell(如命令提示符.PowerShell 和适用于 Linux 的 Windows 子系统 (W ...

  5. Windows Terminal PowerShell 7 美化

    记录一下有关Windows Terminal的折腾记录. 一.最后的成果图 二.Windows Terminal & PowerShell安装 1.Windows Store 直接搜索进行下载 ...

  6. windows terminal agnoster 主题乱码问题

    在 windows terminal 配置好 zsh 和 主题 agnoster 后,发现存在乱码问题: 原主题的箭头符号无法正常显示,尝试在终端下载字体:https://github.com/pow ...

  7. Windows Terminal 完全配置教程(主题以及启动设置)

    一.安装Windows terminal Microsoft Store搜索Windows terminal 第一个和第二个都可以!! 二.选择主题 Windows terminal提供了大量的主题可 ...

  8. Windows Terminal + WSL2 + CENTOS 配置Windows命令终端

    本文主要用于记录在Windows上使用WSL2和centos系统打造一个免费高效的shell终端的配置过程以及界面优化过程. 1.选型分析 之前一直都是使用termius和windows来进行ssh管 ...

  9. 酷炫cmd命令行工具——windows terminal的详细配置

    官网配置地址:An overview on Windows Terminal | Microsoft Docs 目录 一.Windows terminal安装与基本操作 1.Windows Termi ...

最新文章

  1. 基于Flink秒级计算时CPU监控图表数据中断问题
  2. python renames_Python os.renames() 方法
  3. 【caffe-Windows】mnist实例编译之model的使用-classification
  4. 【Java】6.6 Java 8 改进的结构
  5. gpio复用 海思_实现海思平台GPIO驱动
  6. 后台获取(Background Fetch) - HTTP 203 Advent
  7. ISP 图像传感器camera原理
  8. php pdo操作mysql_PHP操作数据库详细(PDO)
  9. 暨南大学研究生招生信息网计算机学院,暨南大学研究生院招生信息网
  10. OpenShift 4 - Istio-Tutorial (2) 部署三个微服务
  11. 用例不全,质量如何保证?
  12. 关闭windows 2008的自动播放
  13. psenet的eval_ctw1500.py解析
  14. 长链剖分算法完整总结
  15. 中文ocr-Benchmarking Chinese Text Recognition: Datasets, Baselines, andan Empirical Study
  16. 1301_两种方式为开发板增加串口监控功能
  17. php文本框代码_php怎么用代码给文本框输入值
  18. 3 Java 基础__不同数据类型之间的运算及进制
  19. 生活没那么复杂,“不要脸”就对了
  20. 打破传统桎梏,挑战性能巅峰,网友:这轻薄本性能强的像游戏本

热门文章

  1. IDEA在Mac下格式化代码快捷键
  2. php安全开发正则表达式,动态网页制作PHP常用的正则表达式
  3. ZKT门禁机标准联接线(按键开关经过卡机)
  4. FxFactory 7 Mac版(Mac视觉特效插件包)
  5. oracle stdevp函数,ORACLE 系统函数与SQLSERVER系统函数的区别是什么
  6. android滑屏效果,Android使用ViewFlipper和GestrueDetector共同实现滑屏效果实例
  7. 【CTF题】使用文件包含漏洞读取网页代码
  8. 腾讯云配置密钥使用putty登录 PuTTY实现Windows向Linux上传文件
  9. php 00截断,文件上传之\00截断与文件包含之%00截断 文件包含漏洞详解 – jinglingshu的博客...
  10. 解决了bridge到blender的2个问题(导入+材质)