Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

general

How to use clear command on the prompt/terminal screen

Anusheh Zohair Mustafeez

Have you ever been working on the command prompt on your Windows machine (synonymous to a terminal on Linux and macOS) and realized the black screen was too cluttered? Lucky for you some simple commands can help clear up the screen.

In this shot, we will go over clearing the command prompt or terminal screen on a Windows, Linux, and macOS machine.

Windows

To clear the screen on Windows, type ‘cls’ onto your command prompt and press the Enter key. The figure below demonstrates what will happen:

Linux

To clear your terminal screen on a Linux machine, type ‘clear’ into your terminal and press the Enter key or simply press CTRL+L. This is shown in the figure below:

MacOS

To clear your terminal screen on a MacOS machine, type either ‘clear’ into your terminal and press the Enter key or simply press CMD+K. This is shown in the figure below:

RELATED TAGS

general

CONTRIBUTOR

Anusheh Zohair Mustafeez
RELATED COURSES

View all Courses

Keep Exploring