To clear the contents of the Command Prompt (CMD) screen on Windows, or the Terminal screen on macOS and Linux, you can use a simple command. Here's how:

Windows:

  1. Open the Command Prompt (CMD) by pressing the Windows key + R, typing 'cmd', and pressing Enter.
  2. Type 'cls' and press Enter. This will clear the Command Prompt screen, removing all previous commands and output.

macOS/Linux:

  1. Open the Terminal application.
  2. Type 'clear' and press Enter. This will clear the Terminal screen, achieving the same result as 'cls' on Windows.

After executing the 'cls' or 'clear' command, your command prompt or terminal screen will be cleared, providing you with a clean slate. Note that clearing the screen only removes the previous command history and output from the current session. It does not affect any executed commands or saved files.

How to Clear Command Prompt (CMD) or Terminal Screen

原文地址: https://www.cveoy.top/t/topic/B29 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录