Windows Terminal安装并美化
介绍
Windows Teminal是一款新式、快速、高效、强大的终端应用程序,适用于命令行工具、命令提示符、PowerShell、WSL(Linux子系统)等等的Shell用户,主要功能包括多选项卡、窗格、Unicode/UTF-8字符支持、GPU 加速文本渲染引擎,以及自定义主题、样式和配置等等。
Github地址:https://github.com/microsoft/terminal
官网下载地址:https://www.microsoft.com/zh-cn/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab
安装Windows Terminal
打开Microsoft Store
,搜索Windows Teminal
并安装。
启动:
安装最新版本PowerShell
Widows 10 默认是 Windows PowerShell 是 5.X 版本,在 Win10 V1903 以上版本后,打开 PowerShell 时,会提示 “尝试新的跨平台 PowerShell https://aka.ms/pscore6” ,打开提示网址。
下载地址:https://github.com/PowerShell/PowerShell/releases
选择PowerShell-<version>-win-<os-arch>.msi
格式的安装包:
下载后,双击安装程序并按照提示进行操作。
安装程序在 Windows“开始”菜单中创建一个快捷方式。
- 默认情况下,包安装位置为
$env:ProgramFiles\PowerShell\
- 可以通过“开始”菜单或
$env:ProgramFiles\PowerShell\\pwsh.exe
启动 PowerShell
PowerShell 7 安装到新目录,并与 Windows PowerShell 5.1 并行运行。 对于 PowerShell Core 6.x,PowerShell 7 是删除 PowerShell Core 6.x 的就地升级。
- PowerShell 7 安装到
$env:ProgramFiles\PowerShell\7
$env:ProgramFiles\PowerShell\7
文件夹已添加到$env:PATH
$env:ProgramFiles\PowerShell\6
文件夹已删除
如果需要与 PowerShell 7 并行运行 PowerShell 6,请使用 ZIP 安装方法重新安装 PowerShell 6。
查看版本,在命令行窗口中输入命令
$PSVersionTable.PSVersion
美化Windows Terminal
参考:https://docs.microsoft.com/zh-cn/windows/terminal/
默认会话为Power Shell 5.x版本,将之修改为7
"defaultProfile":
的值改为"source": "Windows.Terminal.PowershellCore"
的guid即可,例如它的guid为"{574e775e-4f2a-5b96-ac1e-a2962a402336}"
。
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
schemes配置
{
"name": "Snazzy",
"black": "#000000",
"red": "#fc4346",
"green": "#50fb7c",
"yellow": "#f0fb8c",
"blue": "#49baff",
"purple": "#fc4cb4",
"cyan": "#8be9fe",
"white": "#ededec",
"brightBlack": "#555555",
"brightRed": "#fc4346",
"brightGreen": "#50fb7c",
"brightYellow": "#f0fb8c",
"brightBlue": "#49baff",
"brightPurple": "#fc4cb4",
"brightCyan": "#8be9fe",
"brightWhite": "#ededec",
"background": "#1e1f29",
"foreground": "#ebece6"
}
毛玻璃主题
若喜欢毛玻璃主题,可以在"profiles"
内加入以下两个参数:
- useAcrylic:如果设置为
true
,窗口将使用acrylic
背景。 设置为false
时,窗口将为普通的、不带纹理的背景。默认值为false
。 - acrylicOpacity:将
useAcrylic
设置为true
时,这会设置该配置文件的窗口透明度。 接受的浮点值为0-1
。默认值为0.5
。
效果如下:
安装oh-my-posh
Github地址:https://github.com/JanDeDobbeleer/oh-my-posh
安装 posh-git 和 oh-my-posh
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Install-Module DirColors
设置 Powershell 的 profile
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
notepad $PROFILE
粘贴以下内容进 profile 文件
Import-Module posh-git
Import-Module oh-my-posh
Import-Module DirColors
主题颜色美化
安装colortool
scoop install colortool
查看颜色方案
colortool -s
设置颜色:
colortool OneHalfDark.itermcolors
Power Shell 7美化
Power Shell 7的配置:
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore",
"colorScheme" : "Snazzy",
"startingDirectory": "E:\\",
"fontFace" : "Cascadia Code PL",
"cursorColor" : "#000000"
}
显示效果如下:
ubuntu美化
Ubuntu的配置:
{
"guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
"hidden": false,
"name": "Ubuntu-20.04",
"colorScheme" : "Snazzy",
"startingDirectory": "E:\\code",
"source": "Windows.Terminal.Wsl"
},
修改命令提示符,修改root用户的~/.bashrc
文件:
export PS1='\[\e[31;1m\][\u\[\e[37;1m\]@\[\e[34;1m\]\H \W]\[\e[35;1m\]\$ \[\e[0m\]'
新建/etc/profile.d/ps1.sh
export PS1='\[\e[36;1m\][\u\[\e[33;1m\]@\[\e[35;1m\]\H \W]\[\e[34;1m\]\$ \[\e[0m\]'
新建/etc/profile.d/alias.sh
alias cp='cp -i'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
alias xzegrep='xzegrep --color=auto'
alias xzfgrep='xzfgrep --color=auto'
alias xzgrep='xzgrep --color=auto'
alias zegrep='zegrep --color=auto'
alias zfgrep='zfgrep --color=auto'
alias zgrep='zgrep --color=auto'
显示效果如下:
Windows Terminal安装并美化的更多相关文章
- Windows Terminal 安装及美化
windows terminal 是今年微软Build大会上推出的一款的全新终端,用来代替cmder之类的第三方终端.具有亚克力透明.多标签.Unicode支持(中文,Emoji).自带等宽字体等这些 ...
- Windows Terminal 安装与配置
1 安装 安装可以从应用商店安装(直接搜索即可)或者Github安装(可以戳这里): 下载msixbundle格式的文件即可直接打开安装. 2 配置前准备 2.1 下载字体 推荐使用FiraCode, ...
- Windows Terminal 新手入门
翻译自 Kayla Cinnamon 2020年12月17日的文章<Getting Started with Windows Terminal> [1] 安装 Windows Termin ...
- 黑科技抢先尝(续2) - Windows terminal中Powershell Tab的极简美化指南
目录 安装python 安装git 安装powerline字体 主题定制 安装oh-my-posh 查看策略组的执行权限 使用choco 安装终端模拟器 - ConEmu 优化 PowerShell ...
- 黑科技抢先尝(续) - Windows terminal中WSL Linux 终端的极简美化指南
目录 修改默认源,为apt-get安装提速 安装python 和 python pip 安装 zsh 安装powerline-font中的特定字体 安装powerline-shell 修改~目录下的配 ...
- Windows10上安装Linux子系统(WSL2,Ubuntu),配合Windows Terminal使用
Linux 的 Windows 子系统可让开发人员按原样运行 GNU/Linux 环境 - 包括大多数命令行工具.实用工具和应用程序 - 且不会产生传统虚拟机或双启动设置开销. WSL 说白了安装Li ...
- 深入浅出,遇见Windows Terminal(Windows终端器),体验及美化新一代终端神器
Windows Terminal 简介 Windows Terminal is a new, modern, feature-rich, productive terminal application ...
- Windows Terminal 美化教程
Windows Terminal 美化教程 1.安装Windows Terminal 在微软商店搜索Windows Terminal下载即可 2.安装相应的插件 使用管理员权限打开Windows Te ...
- 使用 oh-my-posh 美化 windows terminal,让其接近oh-my-zsh
本文旨在快速让你进行美化,少踩一些坑,原文出自我的博客:prettier-windows-terminal-with-oh-my-posh 为了同 iterm2 下的 oh-my-zsh 保持基本一致 ...
随机推荐
- Linux系统管理第一次作业 系统命令
上机作业: 1.请用命令查出ifconfig命令程序的绝对路径 [root@localhost ~]# which ifconfig /usr/sbin/ifconfig 2.请用命令展示以下命令哪 ...
- java 之 继承 super关键籽 this关键字 final关键字
继承 语法: 使用 extends 来继承 class子类 extends父类{ 子类属性 子类方法 } 继承的特点: 1.子类会把父类所有的属性和方法继承下来,final修饰的类是不可以被继承 ...
- 使用3种协议搭建yum仓库
制作本地yum仓库 开启服务一般要关闭防火墙,selinux之后再reboot ## 方案一:FTP协议------ftp://IP 下载vsftpd---启动vsftpd---ftp://10.0. ...
- C# 对 TCP 客户端的状态封装
TCP客户端连接TCP服务器端有几种应用状态: 与服务器的连接已建立 与服务器的连接已断开 与服务器的连接发生异常 应用程序可按需求合理处理这些逻辑,比如: 连接断开后自动重连 连接断开后选择备用地址 ...
- 数学--数论--HDU1576 A / B(逆元)
问题描述 要求(A / B)%9973,但由于A很大,我们只被告知n(n = A%9973)(我们给定的A必能被B整除,且gcd(B,9973)= 1). 输入项 数据的第一行是一个T,表示有T组数据 ...
- MySQL如何安装-教程
1.先从官网上下载Mysql压缩包https://dev.mysql.com/downloads/mysql/2.解压出来的mysql压缩包是没有图片中的data文件夹和my.ini 如图所示: 3. ...
- 【网络基础】ARP地址解析协议
ARP(Address Rssolution Protocol) 地址解析协议 用于将IP地址解析为MAC地址. MAC地址是设备的物理地址,是被分配给每一个网络接口卡的全球唯一序号. 全球唯一:理论 ...
- golang之array
golang使用array表示固定大小的数组,使用slice表示动态数组. package main import "fmt" func main() { var a = [5]i ...
- C语言程序设计实验报告三
C程序设计实验报告 姓 名:张美盛 实验地点:家 实验时间:2020年3月29日 实验项目:4.3.1 If语句的应用 4.3.2 switch-case的应用 4.3.3 switch-case嵌套 ...
- jdbc连接mysql数据库 (idea)
mysql我们已经不再陌生,但是通过Java来操作数据库的增删改查,我们就需要用到jdbc来连接: 我们使用idea来连接数据库,首先:我们电脑上需要安装idea和mysql,之后在网站上登录MySQ ...