Build a Better Process

Linux clear Command Summary with Examples

Linux clear allows you to clear the terminal screen.
  1. Purpose - Learn what clear is for and how to find help.
  2. Options - Review a few common options and arguments.
  3. Examples - Walk through code examples with clear.
  4. A tip - Finish off with one more insight.
face pic by Paul Alan Davis, CFA
Updated: February 23, 2021
In this tutorial on Linux clear, 3 of 100, below find a 3-4 minute introductory video, a text-based tutorial and all of the code examples from the video.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / clear-command.html

An ad-free and cookie-free website.

The Linux clear command


Learn to erase the terminal screen at the Linux command line.

Video Tutorial

Videos can also be accessed from the Linux Essentails Playlist on YouTube.

Linux clear Command Summary with Examples (3:17)

Video Script

The Command and Why You Need It

Our third word, or command to memorize is clear from the category Navigation.

clear allows you to clear the terminal screen. Recall from our last video, our terminal screen got a little messy as we printed help files using the whatis command. Well, clear will help us here.

Common Linux clear Options
-options description
There are no options

If it helps, think of commands as mini programs and most have this structure. First, type the command, second the option(s) and third the argument(s).

The clear command interestingly has no options and no arguments. Its one purpose is to clear the screen. In the terminal you shouldn't expect things to look pretty; quite the opposite actually. But every once in a while you need to change gears and clear the clutter, and to do so type clear and Enter.

So why is clear an important command? Well, it's the essential command to keep your terminal window tidy. And now you know how to do that.


Okay, the best way to embed this in your memory is by typing in your own terminal window.

Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows 10.

Here we go, let's borrow a command from the previous video and fill up our screen, type whatis -h with no arguments, Enter and look, the 13 available options for the whatis command.

$ whatis -h Usage: whatis [OPTION...] KEYWORD... -d, --debug emit debugging messages -v, --verbose print verbose warnings messages -r, --regex interpret each keyword as a regex -w, --wildcard the keyword(s) contain wildcards -l, --long do not trim output to terminal width -C, --config-file=FILE use this user configuration file -L, --locale=LOCALE define the locale for this search -m, --systems=SYSTEM use manual pages from other systems -M, --manpath=PATH set search path for manual pages to PATH -s, --sections=LIST, --section=LIST search only these sections (colon-separated) -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. $ clear

Next, to clear the screen type clear Enter and there you go.

$ _

A Final Tip

Okay now you know how to use clear. And you know the syntax for commands, options and arguments.

One last tip about the clear command. We'll talk more about aesthetics later, for example, your command prompt may not look as simple as mine so I'll show you how to customize this later.

Okay, thanks for visiting today. I hope this was a fun introduction to the clear command.

Learn More About The Series

For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:

What's Next?

Make sure you don't miss new content, subscribe at YouTube and follow @factorpad on Twitter. Plus, our no-spam email list is always an option.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / clear-command.html

Linux clear command
linux clear
linux clear examples
unix clear
linux clear screen
clear linux screen
linux erase screen
linux clear command tutorial
terminal clear
clear terminal screen
clear console
shell clear screen
clear linux
linux erase screen

A newly-updated free resource. Connect and refer a friend today.