命令提示符是(Command Prompt)Windows不可或缺的一部分。从生成启动程序列表(generating a list of startup programs)到查找 WiFi 密码(finding your WiFi password),您可以使用命令提示符(Command Prompt)执行很多操作。但是,您可能不知道命令提示符(Command Prompt)也很有趣。您所需要的只是了解一些命令提示符(Command Prompt)技巧以使其更有趣。
在本文中,我们将为您提供一些有趣的命令提示符想法,它们将彻底改变您看待命令提示符(Command Prompt)的方式。还有其他所有 Windows 用户都应该知道的标准命令(commands that all Windows users should know)。
如何启动命令提示符?
在您可以使用任何命令提示符(Command Prompt)技巧之前,您需要启动它。按Win + R,键入cmd,然后按Enter。
1.更改命令提示符窗口颜色(Command Prompt Window Color)
命令提示符的纯黑色外观让人感觉乏味。但是,您只需单击几下即可为窗口添加一些活力。您可以更改文本和背景的颜色。
- 右键单击(Right-click)命令提示符(Command Prompt)窗口的标题栏并选择Properties。
- 切换到“属性(Properties)”窗口中的“颜色(Colors)”选项卡。
- 您可以从颜色(Colors)选项卡更改屏幕文本或背景以及弹出文本或背景的颜色。
弹出(Popup)文本和背景是指您在弹出命令提示符(Command Prompt)窗口中看到的文本和背景颜色。例如,当您按 F7 查看命令行历史时,弹出窗口如下所示:
进入颜色(Colors )选项卡后,您可以从预设中选择一种颜色,或者如果需要,您可以调整Selected Color Values。
如果您愿意,可以调整文本或背景的不透明度。
当您进行这些更改时,您会在预览框中看到它们。一旦您对预览中看到的颜色感到满意,请选择“确定”以应用更改。(OK)
2.自定义提示文本
命令提示符(Command Prompt)显示您当前正在使用的目录。默认提示文本很有帮助但很无聊。幸运的是,您可以根据需要自定义提示文本。为此,您需要运行一个简单的命令。
- 启动命令提示符后,运行以下命令:
prompt “prompt text”$G
(Replace)用您想在命令提示符中看到的文本(Command Prompt)替换“提示文本” 。
此命令中的 $G 确保提示符末尾有一个大于号(“>”)。如果你想要一个不同的字符,输入以下命令,你会得到一个选项列表:
帮助提示(help prompt)
3.更改命令提示符窗口(Command Prompt Window)的标题(Title)
命令提示符(Command Prompt)窗口的默认标题是“命令提示符(Command Prompt)”,或“管理员:命令提示符(Command Prompt)”,当您以管理员身份运行它时。除非您使用多个窗口,否则单调通常不是问题。
如果您在从大约十几个正在运行的命令提示符窗口中找到正确的命令提示符(Command Prompt)窗口时有点头晕,您可以给每个窗口一个不同的标题。您需要做的就是运行以下命令:
标题任务名称(title TaskName)
将TaskName替换为您在特定命令提示符(Command Prompt)窗口中运行的任何任务。
请注意,一旦您退出命令提示符(Command Prompt)并再次启动它,您将再次看到默认标题。
4.使用命令提示符(Command Prompt)以ASCII 格式(ASCII)观看星球大战(Star Wars)
借助 telnet 服务,您可以观看《星球大战》(Star Wars)的老式风格。不过,您可以做的不仅仅是使用 telnet 观看《星球大战》(Star Wars),例如玩角色扮演游戏,例如Ateraan。
要在命令提示符(Command Prompt)中观看星球大战(Star Wars),您首先需要确保您的 PC 上启用了Telnet 。如果不是,运行 telnet 命令会给你一个错误。命令提示符(Command Prompt)会告诉您它不会将该命令识别(doesn’t recognize the command)为内部或外部命令。
要查看Telnet是否已启用,请首先在“开始”菜单(Start Menu)中搜索“打开或关闭 Windows 功能”,(Turn Windows features on or off)然后选择“最佳(Best)匹配”。在Windows(Windows)功能列表中搜索(Search)Telnet 客户端(Telnet Client)。如果未选中它旁边的框,请选中它并选择OK。
启用Telnet后,启动命令提示符(Command Prompt)并运行以下命令:
telnet.towel.blinkenlights.nl
使用Telnet,您还可以做一些其他很酷的事情。例如,您可以玩游戏或与“来自地狱的混蛋干员”一起玩乐。以下是您可以玩的游戏以及玩这些游戏需要运行的命令:
- 新世界-Ateraan:telnet ateraan.com 4002
- Achaea:远程登录 achaea.com 23(telnet achaea.com 23)
- Avalon – 传奇的存在:telnet avalon-rpg.com 23
- 免费国际象棋:telnet freechess.org 5000
- 红龙传说:telnet lord.stabs.org 123
- BatMUD:远程登录 batmud.bat.org 23(telnet batmud.bat.org 23)
- Aardwolf:远程登录 aardmud.org 4000(telnet aardmud.org 4000)
您还可以使用以下命令与“地狱的混蛋操作员”打发一些时间:
telnet towel.blinkenlights.nl 666
或者,您可以通过执行以下命令使用Weather Underground检查天气:(Weather Underground)
远程登录 rainmaker.wunderground.com(telnet rainmaker.wunderground.com)
生成电池健康报告
Windows 维护您需要的有关电池运行状况的所有信息。多亏了这一点,您可以使用命令提示符(Command Prompt)生成完整的电池报告。该报告将为您提供电池统计信息,例如满容量、当前容量和出厂规格。
但是,要生成电池报告,您需要以管理员身份运行CMD 。按Win + R,键入cmd,然后按Ctrl + Shift + Enter以管理员身份运行命令提示符。(Command Prompt)
- 启动命令提示符(Command Prompt)后,运行以下命令:
Powercfg /energy
- 报告准备好后,您将能够在System32目录中访问它。它保存为HTML,因此您可以将以下地址粘贴到浏览器的URL栏中以访问报告:
C:\Windows\System32\energy-report.html
不那么无聊的命令提示符
许多人将命令提示符视为为精明的Windows(Windows)用户保留的黑匣子。但是,对于初学者来说熟悉命令提示符(Command Prompt)并不难。如果您偶尔忘记某个命令,您可以随时在命令提示符上(Command Prompt)打开自动完成(turn on auto-complete)功能。另外,如果您知道一些命令提示符(Command Prompt)技巧,那就不是那么无聊了,是吗?
5 Command Prompt Tricks to Make CMD More Interesting
Command Prompt is an indispensable part of Windows. From generating a list of startup programs to finding your WiFi password, there’s a lot you can do with the Command Prompt. However, you may not know that the Command Prompt can also be fun. All you need is to know a few Command Prompt tricks to make it more interesting.
In this article, we’ll give you a few interesting command prompt ideas that’ll change the way you look at the Command Prompt for good. There are other standard commands that all Windows users should know.
How to Launch the Command Prompt?
Before you can use any Command Prompt tricks, you’ll need to launch it. Press Win + R, type cmd, and press Enter.
1. Change the Command Prompt Window Color
The Command Prompt’s black-only look can feel bland. However, you can add some vibrance to the window with just a few clicks. You can change the colors for text as well as the background.
- Right-click on the Command Prompt window’s title bar and select Properties.
- Switch to the Colors tab in the Properties window.
- You can change colors for screen text or background and popup text or background from the Colors tab.
Popup text and background refer to the text and background colors you see on a popup Command Prompt window. For instance, this is what the popup looks like when you press F7 to view the command-line history:
Once you’re in the Colors tab, you can choose one of the colors from the presets, or if you want, you can adjust the Selected Color Values.
If you prefer, you can adjust the opacity of the text or background.
As you make these changes, you’ll see them in the preview box. Select OK to apply the changes once you’re satisfied with the colors you see in the preview.
2. Customize the Prompt Text
The Command Prompt displays the directory you’re currently working in. The default prompt text is helpful but boring. Fortunately, you can customize the prompt text to whatever you want. For this, you’ll need to run a simple command.
- Once you’ve launched the command prompt, run the following command:
prompt “prompt text”$G
Replace the words “prompt text” with the text you want to see in your Command Prompt.
The $G in this command ensures that there’s a greater than sign (“>”) at the end of the prompt. If you want a different character, type in the following command, and you’ll get a list of options:
help prompt
3. Change the Title of the Command Prompt Window
The Command Prompt window’s default title is “Command Prompt”, or “Administrator: Command Prompt” when you run it as an administrator. The monotony isn’t usually an issue unless you’re working with multiple windows.
If you’re getting a little dizzy finding the right Command Prompt window from about a dozen that you’re running, you can give each of them a different title. All you need to do is run the following command:
title TaskName
Replace TaskName with whatever task you’re running in a particular Command Prompt window.
Note that once you exit Command Prompt and launch it again, you’ll once again see the default title.
4. Watch Star Wars in ASCII With Command Prompt
You can watch Star Wars old-school style, thanks to telnet services. You can do much more than watch Star Wars with telnet, though, like playing role-playing games like Ateraan.
To watch Star Wars in Command Prompt, you’ll first need to make sure that Telnet is enabled on your PC. If it’s not, running a telnet command will give you an error. Command Prompt will tell you that it doesn’t recognize the command as an internal or external command.
To see if Telnet is enabled, start by searching for Turn Windows features on or off in the Start Menu and select the Best match. Search the list of Windows features for Telnet Client. If the box next to it isn’t checked, check it and select OK.
Once Telnet is enabled, launch the Command Prompt and run the following command:
telnet.towel.blinkenlights.nl
With Telnet, you can also do some other cool stuff. For instance, you can play games or have fun with the “Bastard Operator from Hell”. Here are the games you can play and the commands you’d need to run for playing them:
- New Worlds-Ateraan: telnet ateraan.com 4002
- Achaea: telnet achaea.com 23
- Avalon – The Legend Lives: telnet avalon-rpg.com 23
- Free Chess: telnet freechess.org 5000
- Legend of the Red Dragon: telnet lord.stabs.org 123
- BatMUD: telnet batmud.bat.org 23
- Aardwolf: telnet aardmud.org 4000
You can also kill some time with the “Bastard Operator from Hell” with this command:
telnet towel.blinkenlights.nl 666
Or, you can check the weather with Weather Underground by executing the following command:
telnet rainmaker.wunderground.com
Generate a Battery Health Report
Windows maintains all the information you need about your battery’s health. Thanks to this, you can generate a full battery report using the Command Prompt. The report will give you battery stats like full capacity, current capacity, and factory specs.
However, to generate a battery report, you’ll need to run CMD as an administrator. Press Win + R, type cmd, and press Ctrl + Shift + Enter to run Command Prompt as an administrator.
- Once you’ve launched Command Prompt, run the following command:
Powercfg /energy
- When the report is ready, you’ll be able to access it in the System32 directory. It’s saved as an HTML, so you can paste the following address in your browser’s URL bar to access the report:
C:\Windows\System32\energy-report.html
The Not-So-Boring Command Prompt
A lot of people view the command prompt as a black box reserved for savvy Windows users. However, it’s not that difficult for a beginner to get comfortable with the Command Prompt. If you forget a command every once in a while, you can always turn on auto-complete on Command Prompt. Plus, it’s not all that boring if you know a few Command Prompt tricks, is it?