How to Clear the Terminal Screen in Ubuntu

The Visual Overload Vector

When administering an Ubuntu server via the command line, you will frequently execute commands that dump massive walls of text onto your screen. Compiling software, checking the status of system services, or pinging a network address can instantly fill your terminal window with hundreds of lines of output. When you subsequently attempt to execute a precise, critical command, this visual clutter makes it incredibly difficult to focus and increases the probability of making a catastrophic typographical error.

How to Clear the Terminal Screen

You must instruct the terminal emulator to instantly purge all historical text output from the immediate visible area, providing a pristine, blank workspace.

1. Open your terminal application or connect to your server via SSH.
2. The Primary Command: When your screen is cluttered, simply type the following word at the prompt:

clear

3. Press Enter.
4. The terminal will instantly snap your active command prompt to the absolute top-left corner of the window, rendering the rest of the screen completely blank.
5. The Keyboard Shortcut (Fastest): Typing the word `clear` is inefficient if you do it fifty times a day. Instead, you can execute the exact same command instantaneously by pressing a two-key combination. Hold down the Ctrl key and press the L key.
* Ctrl + L will immediately clear the screen, even if you are halfway through typing a complex command (it will clear the screen and preserve what you were typing).

Crucial Note: Neither the `clear` command nor the `Ctrl+L` shortcut actually deletes the history. If you use your mouse scroll wheel to scroll up, you will see all the previous text is still there in the terminal buffer. It simply pushes the clutter out of your immediate field of view.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.