Linux Basic Commands
11. clear
clear Command in Linux
The clear command is used to clear the terminal screen.
It doesn’t delete files or commands — it just makes your terminal window look clean.
🔹 Syntax:
clear
🔹 Example:
Before:
$ lsbin sbin root sys etc home$ pwd/home/ashwin$ clear
After:
👉 All the previous output is cleared, and you’re left with a fresh terminal prompt.
🔹 Shortcut Alternative:
Instead of typing clear, you can also press:
Ctrl + L
👉 This also clears the screen (works in most terminals).
🔹 Important Note:
-
It does not delete history. You can still scroll up with the mouse or scroll bar to see old commands/output.
-
It’s purely for visual clarity.
Try With Linux Practice