以下是一些基本的命令提示技巧(Command Prompt Tricks)和提示(Tips),可帮助Windows用户在Windows 11、Windows 10、Windows 8 或Windows 7 中使用(Windows)CMD。首先,启动命令提示符。这些提示也适用于Windows 终端。( Windows Terminal.)
命令提示符提示
这是您应该尝试并了解更多信息的列表。
- 自定义 CMD 窗口
- 在 CMD 中复制或粘贴
- 调整提示(Prompt)窗口的大小
- 在命令提示符中使用拖放
- 在 CMD 中自动完成文件路径
- CMD 帮助
- 使命令提示符透明
- CMD 键盘快捷键
- 命令提示历史
如果您以管理员权限打开命令(Command)提示符,您将不会看到任何不同。定制对所有人都是一样的。
1]自定义CMD窗口
您可以随意自定义黑色 CMD 窗口(customize your black CMD window)。单击(Click)标题栏左上角出现的黑色CMD图标,然后选择属性。(CMD)在这里,您也可以更改选项、字体、布局和颜色。
您还可以使用以下语法更改颜色:color [attr]。
这篇文章将向您展示如何将自定义字体添加到命令提示符。而这个改变背景和前景色。
2]在CMD中复制或粘贴
您不能使用 Ctrl+C进行复制。要复制,您必须在CMD(CMD)内右键单击,选择标记,(Mark,)然后将突出显示的框拖到要复制的文本上。右键单击(Right-click)文本。它会自动被复制。
要粘贴剪贴板(Clipboard)内容,您可以右键单击CMD并选择粘贴(Paste)以粘贴复制的文本。或者您可以使用 Ctrl+V。
或者,打开“属性(Properties)”框,然后从“选项(Options)”选项卡中选择“快速编辑(Quick Edit)”选项。现在您可以照常复制了。
3]调整(Adjust)提示(Prompt)窗口的大小
您可以使用以下语法调整提示窗口的大小:(Prompt)
Syntax: mode [width], [height]
4]在命令提示符(Command Prompt)中(Drop)使用(Use Drag)拖放
无需输入文件的完整路径,您只需拖放( drag and drop)文件即可。将输入完整路径。
5]在CMD中自动完成文件路径
要自动完成文件路径(auto-complete file paths),请键入路径的第一部分,例如E:\ :。现在单击选项卡(Tab)。所有可用的文件名和文件夹将被循环。
6] CMD帮助
在CMD 方面(CMD)需要帮助(help)?如果您知道某个命令但不确定它是如何工作的,请在命令后添加“ /’ or ‘?' 并执行它。如果命令有效,命令提示符将为您提供与其相关的所有信息。
7]使命令提示符(Command Prompt)透明
要在Windows 10(Windows 10)中快速查看CMD窗口背后的内容,请按Ctrl+Shift+-以增加透明度。要使其再次不透明,请按Ctrl+Shift++。
8] CMD键盘快捷键
这些命令提示符键盘快捷键(Command Prompt keyboard shortcuts)将帮助您更快地使用它。
9]查看命令提示历史
按向上箭头从命令历史记录中选择上一个命令(selects a previous command);同样,向下箭头选择下一个命令。要查看完整的命令提示符历史记录,请按F7键。
您可以通过按 F7 键查看会话中的命令历史记录。(Command)您还可以在 CMD 窗口中键入doskey /history ,以在命令提示符本身中查看命令历史记录。(command history)
Incidentally, running CMD in full-screen mode, by pressing Alt+Enter, is no longer supported, from Windows Vista onwards. But you can check this post for a workaround of sorts.
寻找更多?查看这些适用于 Windows 11/10/8/7 的高级 CMD 技巧(Advanced CMD Tricks )。
如何获取命令提示符列表?
最简单的方法是键入Help并在(Help)命令提示符(Command Prompt)上按 enter ,然后 ti 将列出所有可用的工具和命令。如果列表太长,您可以将输出保存到文本文件中,然后用您喜欢的编辑器打开它,以便一一查看。
* 在命令行中有什么作用?
它是一个通配符,表示ALL。它可以是所有文件、所有条件或除整个之外的任何内容。所以这将取决于它在哪里以及如何使用。如果您将它与Directory命令一起使用,那么它将显示目录中的所有文件。
如何将命令提示符输出保存在文本文件中?
将您计划执行的命令的输出保存在文本文件中;您可以使用the > operator.例如,如果要将所有命令的列表保存在文本文件中,请使用Help > Output.txt.同样,要将目录中的所有文件保存到文本文件中,请使用dir > output.txt.
Basic Command Prompt Tips for Windows 11/10
Here аre some basiс Command Prompt Trіcks and Tіps to help a Windows user, while using the CMD in Windows 11, Windowѕ 10, Windows 8, or Windows 7. To begin, first, launch Cоmmand Prompt. These tips will also work on Windows Terminal.
Command Prompt Tips
Here is the list which you should try and know more about it.
- Customize CMD window
- Copy or Paste in CMD
- Adjust the size of the Prompt window
- Use Drag and Drop in Command Prompt
- Auto-complete file paths in CMD
- CMD Help
- Make the Command Prompt transparent
- CMD Keyboard Shortcuts
- Command Prompt History
If you open a Command prompt with admin privileges, you will not see anything different. The customization is the same for all.
1] Customize CMD window
You can customize your black CMD window any way you want. Click on the black CMD icon which appears on the top left side of the title bar and select Properties. Here you can change options, fonts, layout, and colors too.
You can also change the colors using the syntax: color [attr].
This post will show you how to add Custom Fonts to Command Prompt. and this one to change the Background and Foreground Color.
2] Copy or Paste in CMD
You cannot use Ctrl+C to copy. To copy, you have to right-click inside the CMD, select Mark, and then drag the highlighted box to the text you want to copy. Right-click on the text. It will automatically get copied.
To paste your Clipboard contents, you can right-click in the CMD and select Paste to paste the copied text. Or you may use Ctrl+V.
Alternatively, open the Properties box, and from the Options tab, select the Quick Edit option. Now you will be able to copy as usual.
3] Adjust the size of the Prompt window
You can adjust the size of the Prompt window by using the following syntax:
Syntax: mode [width], [height]
4] Use Drag and Drop in Command Prompt
Rather than typing the full path of a file, you can simply drag and drop the file. The full path will get entered.
5] Auto-complete file paths in CMD
To auto-complete file paths, type the first part of the path, say E:\ . Now click on Tab. All available file names & folders will be cycled.
6] CMD Help
Need help with CMD? If you know a command but aren’t sure how it works, suffix the command with ‘/’ or ‘?’ and execute it. If the command is valid, the command prompt will give you all the information related to it.
7] Make the Command Prompt transparent
To quickly see what is behind your CMD window in Windows 10, press Ctrl+Shift+- to increase transparency. To make it opaque again, press Ctrl+Shift++.
8] CMD Keyboard Shortcuts
These Command Prompt keyboard shortcuts will help you work faster with it.
9] See Command Prompt History
Pressing the arrow up selects a previous command from your command history; similarly, the arrow down selects the next command. To see your complete command prompt history, press the F7 key.
You can see the Command history in a session, by pressing the F7 key. You can also type doskey /history in the CMD window, to see the command history in the command prompt itself.
Incidentally, running CMD in full-screen mode, by pressing Alt+Enter, is no longer supported, from Windows Vista onwards. But you can check this post for a workaround of sorts.
Looking for more? Check out these Advanced CMD Tricks for Windows 11/10/8/7.
How do I get a list of command prompts?
The easiest way to do this is to type Help and press enter on the Command Prompt, and ti will list down all the tools and commands available. If the list is too long, you can save the output into a text file, and then open it with your favorite editor to view them one by one.
What does * do in the command line?
It is a wildcard which means ALL. It can be all files, all conditions, or anything but the entire. So it will depend on where and how it is used. If you use it with the Directory command, then it will reveal all the files in the directory.
How to save command prompt output in a text file?
To save the output of a command you plan to execute in a text file; you can use the > operator. For example, if you want to save the list of all commands in a text file, then use Help > Output.txt. Similarly for saving all files in a directory into a text file, then use dir > output.txt.