Online Linux Terminal Logo
OnlineLinuxTerminal
System & ProcessesCLI Reference

$clear

Clear the terminal screen display and scrollback buffer.

Syntax DefinitionPOSIX standard
clear
Linux Community2.4k Online

Chat with real Linux users, learn new commands & get free cheat sheet PDFs.

Try `clear` Live in Interactive Sandbox

Zero-install client simulation with real-time feedback.

Open in Fullscreen Workspace↗
bash — terminal

Overview & How clear Works

`clear` clears your terminal canvas, giving you a clean working space with the prompt placed at the top of the window. You can also trigger this anytime with the `Ctrl + L` keyboard shortcut.

Common Flags & Command Options

Flag / OptionDescription
-xDo not clear the scrollback buffer; only scroll current screen view.

Practical Real-World Examples

Example #1Clear terminal screen

Wipes the screen buffer and resets prompt to top.

Frequently Asked Questions

What is the keyboard shortcut for clear?

Pressing `Ctrl + L` in almost all Linux shells instantly clears the screen.