cmd弄电脑滚绿代码_cmd美化,这样的cmd你见过吗

2023-05-16

用Windows10的你见过这样的cmd(命令提示符)窗口吗?不知道它是什么?

美化后的cmd
命令提示符是在操作系统中,提示进行命令输入的一种工作提示符。在不同的操作系统环境下,命令提示符各不相同。

身为小仙女 / 小帅哥的你还不知道是什么,那我说写python时,你可能用过它,电脑坏了,你在搜索引擎上搜索半天,找到相关解决办法------一堆看不懂的代码,写解决办法的大佬可能会让你用它兄弟(Windows PowerShell)来运行这些代码!

你电脑上的cmd窗口是不是长得很黑,很难看?

Windows10原始cmd

cmd怎么美化

  • 打开Windows商店,搜索:Windows terminal
Windows Terminal 是一个全新的、流行的、功能强大的命令行终端工具。包含很多来社区呼声很高的特性,例如:多 Tab 支持、富文本、多语言支持、可配置、主题和样式,支持 emoji 和基于 GPU 运算的文本渲染等等。同时该终端依然符合我们的目标和要求,以确保它保持快速、高效,并且不会消耗大量内存和电源。

1
  • 打开安装好的软件

你会发现你的cmd / PowerShell窗口仍然是黑乎乎的,还是不好看,别急,让我们来设置一下:

(1) 点击上方的箭头,图片中红色圆圈内:

2

(2) 接着点击设置 (setting),设置其实是一个json文档,如果你电脑上没有别的文本编辑器的话,就用Windows 10 自带的记事本打开它。

3

(3) 修改里面的内容:

找到下面的内容:

 "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
        },
        "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": "命令提示符",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            }
        ]
    },

修改为(以我的为例子):

    "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
        },
        "list":
        [
            {
                // Make changes here to the powershell.exe profile.
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",//powershell的id
                "name": "Windows PowerShell",   //powershell的名字
                "commandline": "powershell.exe",
                "hidden": false,
                "backgroundImage": "注意:这里是写图片的路径",      // 在背景中插入图片
                "backgroundImageOpacity": 0.6,      // 插入图片的透明度,不能看到桌面
                "backgroundImageStretchMode": "fill",
                "colorScheme" : "Campbell",         //此处以及下方是字体和颜色等的设定
                "commandline" : "powershell.exe",
                "cursorColor" : "#FFFFFF",
                "cursorShape" : "bar",
                "fontFace" : "Consolas",
                "fontSize" : 12,
                "foreground" : "#FFFFFF",
                "guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "historySize" : 9001,
                "icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
                "name" : "Windows PowerShell",
                "padding" : "0, 0, 0, 0",
                "snapOnInput" : true,
                "startingDirectory" : "%USERPROFILE%",
                "tabTitle" : "powershell",
                "useAcrylic" : true
            },
            {
                // Make changes here to the cmd.exe profile.
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", // cmd的id
                "name": "cmd",      //powershell的名字
                "commandline": "cmd.exe",
                "hidden": false,
                "backgroundImage" : "注意:这里是写图片的路径",     // 在背景中插入图片
                "backgroundImageOpacity" : 0.6,     //插入图片的透明度,但不能看到桌面
                "backgroundImageStretchMode" : "fill",
                "closeOnExit" : true,
                "colorScheme" : "Campbell",
                "commandline" : "cmd.exe",
                "cursorColor" : "#FFFFFF",      // 此处以及下方是字体和颜色等的设定
                "cursorShape" : "bar",
                "fontFace" : "Consolas",
                "fontSize" : 12,
                "foreground" : "#FFFFFF",
                "guid" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "historySize" : 9001,
                "icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
                "name" : "cmd",
                "padding" : "0, 0, 0, 0",
                "snapOnInput" : true,
                "startingDirectory" : "%USERPROFILE%",
                "tabTitle" : "cmd",
                "useAcrylic" : true
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            }
        ]
    },

(4) ctrl+s保存对json的修改

解决打开Windows terminal就显示cmd,而不是powershell的问题

找到"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",大括号内的一串代码为powershell的guid,把它修改成cmd的guid,正常情况为:0caa0dad-35be-5f56-a8ff-afceeeaa6101

powershell

感谢阅读!

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

cmd弄电脑滚绿代码_cmd美化,这样的cmd你见过吗 的相关文章

随机推荐